Skip to content

Commit 74187f6

Browse files
committed
Add all remaining federation directives to list of built-ins
1 parent a373ac7 commit 74187f6

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

.changeset/late-webs-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-tools/import': patch
3+
---
4+
5+
Add all remaining federation directives to list of built-ins

packages/import/src/index.ts

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,30 @@ import { parseGraphQLSDL } from '@graphql-tools/utils';
4242

4343
const builtinTypes = ['String', 'Float', 'Int', 'Boolean', 'ID', 'Upload'];
4444

45-
const builtinDirectives = [
46-
'deprecated',
47-
'skip',
48-
'include',
49-
'cacheControl',
50-
'key',
45+
const federationDirectives = [
46+
'composeDirective',
47+
'extends',
5148
'external',
52-
'requires',
49+
'inaccessible',
50+
'interfaceObject',
51+
'key',
52+
'link',
53+
'override',
5354
'provides',
54-
'connection',
55+
'requires',
56+
'shareable',
57+
'tag',
58+
];
59+
60+
const builtinDirectives = [
61+
'cacheControl',
5562
'client',
63+
'connection',
64+
'deprecated',
65+
'include',
66+
'skip',
5667
'specifiedBy',
57-
'link',
68+
...federationDirectives,
5869
];
5970

6071
const IMPORT_FROM_REGEX = /^import\s+(\*|(.*))\s+from\s+('|")(.*)('|");?$/;

0 commit comments

Comments
 (0)