@theguild/federation-composition 0.1.1 → 0.1.2-alpha-20231006074034-05528f3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/cjs/graphql/helpers.js +6 -2
- package/esm/graphql/helpers.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Supports all Federation versions prior to v2.4.0. Drop-in replacement for `@apol
|
|
|
12
12
|
- produces Supergraph SDL (can be used with Apollo Router and every tool that supports Supergraph
|
|
13
13
|
SDL)
|
|
14
14
|
- does not support Hints
|
|
15
|
+
- a lot faster! 5x faster when composing and validating simple schemas, but 28x faster at big scale.
|
|
15
16
|
|
|
16
17
|
## Installation
|
|
17
18
|
|
package/cjs/graphql/helpers.js
CHANGED
|
@@ -16,13 +16,17 @@ function stripFederationFromSupergraph(supergraph) {
|
|
|
16
16
|
SchemaDefinition: remove,
|
|
17
17
|
SchemaExtension: remove,
|
|
18
18
|
EnumTypeDefinition: node => {
|
|
19
|
-
if (node.name.value === 'core__Purpose' ||
|
|
19
|
+
if (node.name.value === 'core__Purpose' ||
|
|
20
|
+
node.name.value === 'join__Graph' ||
|
|
21
|
+
node.name.value === 'link__Purpose') {
|
|
20
22
|
return null;
|
|
21
23
|
}
|
|
22
24
|
return node;
|
|
23
25
|
},
|
|
24
26
|
ScalarTypeDefinition: node => {
|
|
25
|
-
if (node.name.value === '_FieldSet'
|
|
27
|
+
if (node.name.value === '_FieldSet' ||
|
|
28
|
+
node.name.value === 'link__Import' ||
|
|
29
|
+
node.name.value === 'join__FieldSet') {
|
|
26
30
|
return null;
|
|
27
31
|
}
|
|
28
32
|
return node;
|
package/esm/graphql/helpers.js
CHANGED
|
@@ -12,13 +12,17 @@ export function stripFederationFromSupergraph(supergraph) {
|
|
|
12
12
|
SchemaDefinition: remove,
|
|
13
13
|
SchemaExtension: remove,
|
|
14
14
|
EnumTypeDefinition: node => {
|
|
15
|
-
if (node.name.value === 'core__Purpose' ||
|
|
15
|
+
if (node.name.value === 'core__Purpose' ||
|
|
16
|
+
node.name.value === 'join__Graph' ||
|
|
17
|
+
node.name.value === 'link__Purpose') {
|
|
16
18
|
return null;
|
|
17
19
|
}
|
|
18
20
|
return node;
|
|
19
21
|
},
|
|
20
22
|
ScalarTypeDefinition: node => {
|
|
21
|
-
if (node.name.value === '_FieldSet'
|
|
23
|
+
if (node.name.value === '_FieldSet' ||
|
|
24
|
+
node.name.value === 'link__Import' ||
|
|
25
|
+
node.name.value === 'join__FieldSet') {
|
|
22
26
|
return null;
|
|
23
27
|
}
|
|
24
28
|
return node;
|
package/package.json
CHANGED