@graphql-mesh/fusion-composition 0.8.15 → 0.8.16-alpha-20250905102937-2c1c7941372e68f4027f991785f8f2030352d08c
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/cjs/compose.js +19 -17
- package/esm/compose.js +19 -17
- package/package.json +2 -2
package/cjs/compose.js
CHANGED
|
@@ -425,24 +425,26 @@ function getAnnotatedSubgraphs(subgraphs, options = {}) {
|
|
|
425
425
|
`);
|
|
426
426
|
}
|
|
427
427
|
const queryType = transformedSubgraph.getQueryType();
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
428
|
+
if (queryType) {
|
|
429
|
+
const queryTypeDirectives = (0, utils_1.getDirectiveExtensions)(queryType) || {};
|
|
430
|
+
if (extraSchemaDefinitionDirectives) {
|
|
431
|
+
importedDirectives.add('@extraSchemaDefinitionDirective');
|
|
432
|
+
importedDirectivesAST.add(/* GraphQL */ `
|
|
433
|
+
scalar _DirectiveExtensions
|
|
434
|
+
`);
|
|
435
|
+
importedDirectivesAST.add(/* GraphQL */ `
|
|
436
|
+
directive @extraSchemaDefinitionDirective(
|
|
437
|
+
directives: _DirectiveExtensions
|
|
438
|
+
) repeatable on OBJECT
|
|
439
|
+
`);
|
|
440
|
+
queryTypeDirectives.extraSchemaDefinitionDirective ||= [];
|
|
441
|
+
queryTypeDirectives.extraSchemaDefinitionDirective.push({
|
|
442
|
+
directives: extraSchemaDefinitionDirectives,
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
const queryTypeExtensions = (queryType.extensions ||= {});
|
|
446
|
+
queryTypeExtensions.directives = queryTypeDirectives;
|
|
443
447
|
}
|
|
444
|
-
const queryTypeExtensions = (queryType.extensions ||= {});
|
|
445
|
-
queryTypeExtensions.directives = queryTypeDirectives;
|
|
446
448
|
if (importedDirectives.size) {
|
|
447
449
|
transformedSubgraph = (0, federation_utils_js_1.importMeshDirectives)(transformedSubgraph, [...importedDirectives]);
|
|
448
450
|
}
|
package/esm/compose.js
CHANGED
|
@@ -418,24 +418,26 @@ export function getAnnotatedSubgraphs(subgraphs, options = {}) {
|
|
|
418
418
|
`);
|
|
419
419
|
}
|
|
420
420
|
const queryType = transformedSubgraph.getQueryType();
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
421
|
+
if (queryType) {
|
|
422
|
+
const queryTypeDirectives = getDirectiveExtensions(queryType) || {};
|
|
423
|
+
if (extraSchemaDefinitionDirectives) {
|
|
424
|
+
importedDirectives.add('@extraSchemaDefinitionDirective');
|
|
425
|
+
importedDirectivesAST.add(/* GraphQL */ `
|
|
426
|
+
scalar _DirectiveExtensions
|
|
427
|
+
`);
|
|
428
|
+
importedDirectivesAST.add(/* GraphQL */ `
|
|
429
|
+
directive @extraSchemaDefinitionDirective(
|
|
430
|
+
directives: _DirectiveExtensions
|
|
431
|
+
) repeatable on OBJECT
|
|
432
|
+
`);
|
|
433
|
+
queryTypeDirectives.extraSchemaDefinitionDirective ||= [];
|
|
434
|
+
queryTypeDirectives.extraSchemaDefinitionDirective.push({
|
|
435
|
+
directives: extraSchemaDefinitionDirectives,
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
const queryTypeExtensions = (queryType.extensions ||= {});
|
|
439
|
+
queryTypeExtensions.directives = queryTypeDirectives;
|
|
436
440
|
}
|
|
437
|
-
const queryTypeExtensions = (queryType.extensions ||= {});
|
|
438
|
-
queryTypeExtensions.directives = queryTypeDirectives;
|
|
439
441
|
if (importedDirectives.size) {
|
|
440
442
|
transformedSubgraph = importMeshDirectives(transformedSubgraph, [...importedDirectives]);
|
|
441
443
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/fusion-composition",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.16-alpha-20250905102937-2c1c7941372e68f4027f991785f8f2030352d08c",
|
|
4
4
|
"description": "Basic composition utility for Fusion spec",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-mesh/utils": "
|
|
10
|
+
"@graphql-mesh/utils": "0.104.12-alpha-20250905102937-2c1c7941372e68f4027f991785f8f2030352d08c",
|
|
11
11
|
"@graphql-tools/schema": "^10.0.5",
|
|
12
12
|
"@graphql-tools/stitching-directives": "^3.1.9",
|
|
13
13
|
"@graphql-tools/utils": "^10.8.0",
|