@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/index.cjs.js
CHANGED
|
@@ -503,6 +503,23 @@ function getDocumentNodeFromSchema(schema, options) {
|
|
|
503
503
|
var typesMap = schema.getTypeMap();
|
|
504
504
|
var schemaNode = astFromSchema(schema, pathToDirectivesInExtensions);
|
|
505
505
|
var definitions = schemaNode != null ? [schemaNode] : [];
|
|
506
|
+
var directives = schema.getDirectives();
|
|
507
|
+
try {
|
|
508
|
+
for (var directives_1 = tslib.__values(directives), directives_1_1 = directives_1.next(); !directives_1_1.done; directives_1_1 = directives_1.next()) {
|
|
509
|
+
var directive = directives_1_1.value;
|
|
510
|
+
if (graphql.isSpecifiedDirective(directive)) {
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
517
|
+
finally {
|
|
518
|
+
try {
|
|
519
|
+
if (directives_1_1 && !directives_1_1.done && (_a = directives_1.return)) _a.call(directives_1);
|
|
520
|
+
}
|
|
521
|
+
finally { if (e_1) throw e_1.error; }
|
|
522
|
+
}
|
|
506
523
|
for (var typeName in typesMap) {
|
|
507
524
|
var type = typesMap[typeName];
|
|
508
525
|
var isPredefinedScalar = graphql.isSpecifiedScalarType(type);
|
|
@@ -532,23 +549,6 @@ function getDocumentNodeFromSchema(schema, options) {
|
|
|
532
549
|
throw new Error("Unknown type " + type + ".");
|
|
533
550
|
}
|
|
534
551
|
}
|
|
535
|
-
var directives = schema.getDirectives();
|
|
536
|
-
try {
|
|
537
|
-
for (var directives_1 = tslib.__values(directives), directives_1_1 = directives_1.next(); !directives_1_1.done; directives_1_1 = directives_1.next()) {
|
|
538
|
-
var directive = directives_1_1.value;
|
|
539
|
-
if (graphql.isSpecifiedDirective(directive)) {
|
|
540
|
-
continue;
|
|
541
|
-
}
|
|
542
|
-
definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
546
|
-
finally {
|
|
547
|
-
try {
|
|
548
|
-
if (directives_1_1 && !directives_1_1.done && (_a = directives_1.return)) _a.call(directives_1);
|
|
549
|
-
}
|
|
550
|
-
finally { if (e_1) throw e_1.error; }
|
|
551
|
-
}
|
|
552
552
|
return {
|
|
553
553
|
kind: graphql.Kind.DOCUMENT,
|
|
554
554
|
definitions: definitions,
|