Skip to content

Commit 37e164c

Browse files
authored
Add join__FieldSet, link__Import, link__Purpose to stripFederationFromSupergraph (#15)
Closes #14
1 parent 5febb06 commit 37e164c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.changeset/old-mirrors-happen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@theguild/federation-composition': patch
3+
---
4+
5+
Add join**FieldSet, link**Import, link\_\_Purpose to stripFederationFromSupergraph

src/graphql/helpers.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@ export function stripFederationFromSupergraph(supergraph: DocumentNode) {
1515
SchemaDefinition: remove,
1616
SchemaExtension: remove,
1717
EnumTypeDefinition: node => {
18-
if (node.name.value === 'core__Purpose' || node.name.value === 'join__Graph') {
18+
if (
19+
node.name.value === 'core__Purpose' ||
20+
node.name.value === 'join__Graph' ||
21+
node.name.value === 'link__Purpose'
22+
) {
1923
return null;
2024
}
2125

2226
return node;
2327
},
2428
ScalarTypeDefinition: node => {
25-
if (node.name.value === '_FieldSet') {
29+
if (
30+
node.name.value === '_FieldSet' ||
31+
node.name.value === 'link__Import' ||
32+
node.name.value === 'join__FieldSet'
33+
) {
2634
return null;
2735
}
2836

0 commit comments

Comments
 (0)