@graphql-mesh/fusion-composition 0.8.15 → 0.8.16-alpha-20250905102756-036568e64f83b360f631264a630ed9ce6b261da0
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 +1 -1
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