@graphql-tools/utils 7.7.2 → 7.7.3
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/es5/index.cjs.js +17 -17
- package/es5/index.cjs.js.map +1 -1
- package/es5/index.esm.js +18 -18
- package/es5/index.esm.js.map +1 -1
- package/es5/package.json +1 -1
- package/index.cjs.js +7 -7
- package/index.cjs.js.map +1 -1
- package/index.esm.js +8 -8
- package/index.esm.js.map +1 -1
- package/package.json +1 -1
package/es5/package.json
CHANGED
package/index.cjs.js
CHANGED
|
@@ -450,6 +450,13 @@ function getDocumentNodeFromSchema(schema, options = {}) {
|
|
|
450
450
|
const typesMap = schema.getTypeMap();
|
|
451
451
|
const schemaNode = astFromSchema(schema, pathToDirectivesInExtensions);
|
|
452
452
|
const definitions = schemaNode != null ? [schemaNode] : [];
|
|
453
|
+
const directives = schema.getDirectives();
|
|
454
|
+
for (const directive of directives) {
|
|
455
|
+
if (graphql.isSpecifiedDirective(directive)) {
|
|
456
|
+
continue;
|
|
457
|
+
}
|
|
458
|
+
definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
|
|
459
|
+
}
|
|
453
460
|
for (const typeName in typesMap) {
|
|
454
461
|
const type = typesMap[typeName];
|
|
455
462
|
const isPredefinedScalar = graphql.isSpecifiedScalarType(type);
|
|
@@ -479,13 +486,6 @@ function getDocumentNodeFromSchema(schema, options = {}) {
|
|
|
479
486
|
throw new Error(`Unknown type ${type}.`);
|
|
480
487
|
}
|
|
481
488
|
}
|
|
482
|
-
const directives = schema.getDirectives();
|
|
483
|
-
for (const directive of directives) {
|
|
484
|
-
if (graphql.isSpecifiedDirective(directive)) {
|
|
485
|
-
continue;
|
|
486
|
-
}
|
|
487
|
-
definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
|
|
488
|
-
}
|
|
489
489
|
return {
|
|
490
490
|
kind: graphql.Kind.DOCUMENT,
|
|
491
491
|
definitions,
|