@graphql-tools/load 7.5.14 → 7.6.0-alpha-bdd7f13e.0
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/index.js +4 -3
- package/index.mjs +4 -3
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -608,18 +608,19 @@ function loadDocumentsSync(pointerOrPointers, options) {
|
|
|
608
608
|
* @param options Additional options
|
|
609
609
|
*/
|
|
610
610
|
async function loadSchema(schemaPointers, options) {
|
|
611
|
-
var _a;
|
|
611
|
+
var _a, _b;
|
|
612
612
|
const sources = await loadTypedefs(schemaPointers, {
|
|
613
613
|
...options,
|
|
614
614
|
filterKinds: OPERATION_KINDS,
|
|
615
615
|
});
|
|
616
616
|
const { schemas, typeDefs } = collectSchemasAndTypeDefs(sources);
|
|
617
|
+
schemas.push(...((_a = options.schemas) !== null && _a !== void 0 ? _a : []));
|
|
617
618
|
const mergeSchemasOptions = {
|
|
618
619
|
...options,
|
|
619
|
-
schemas: schemas.concat((
|
|
620
|
+
schemas: schemas.concat((_b = options.schemas) !== null && _b !== void 0 ? _b : []),
|
|
620
621
|
typeDefs,
|
|
621
622
|
};
|
|
622
|
-
const schema$1 = schema.mergeSchemas(mergeSchemasOptions);
|
|
623
|
+
const schema$1 = (typeDefs === null || typeDefs === void 0 ? void 0 : typeDefs.length) === 0 && (schemas === null || schemas === void 0 ? void 0 : schemas.length) === 1 ? schemas[0] : schema.mergeSchemas(mergeSchemasOptions);
|
|
623
624
|
if (options === null || options === void 0 ? void 0 : options.includeSources) {
|
|
624
625
|
includeSources(schema$1, sources);
|
|
625
626
|
}
|
package/index.mjs
CHANGED
|
@@ -583,18 +583,19 @@ function loadDocumentsSync(pointerOrPointers, options) {
|
|
|
583
583
|
* @param options Additional options
|
|
584
584
|
*/
|
|
585
585
|
async function loadSchema(schemaPointers, options) {
|
|
586
|
-
var _a;
|
|
586
|
+
var _a, _b;
|
|
587
587
|
const sources = await loadTypedefs(schemaPointers, {
|
|
588
588
|
...options,
|
|
589
589
|
filterKinds: OPERATION_KINDS,
|
|
590
590
|
});
|
|
591
591
|
const { schemas, typeDefs } = collectSchemasAndTypeDefs(sources);
|
|
592
|
+
schemas.push(...((_a = options.schemas) !== null && _a !== void 0 ? _a : []));
|
|
592
593
|
const mergeSchemasOptions = {
|
|
593
594
|
...options,
|
|
594
|
-
schemas: schemas.concat((
|
|
595
|
+
schemas: schemas.concat((_b = options.schemas) !== null && _b !== void 0 ? _b : []),
|
|
595
596
|
typeDefs,
|
|
596
597
|
};
|
|
597
|
-
const schema = mergeSchemas(mergeSchemasOptions);
|
|
598
|
+
const schema = (typeDefs === null || typeDefs === void 0 ? void 0 : typeDefs.length) === 0 && (schemas === null || schemas === void 0 ? void 0 : schemas.length) === 1 ? schemas[0] : mergeSchemas(mergeSchemasOptions);
|
|
598
599
|
if (options === null || options === void 0 ? void 0 : options.includeSources) {
|
|
599
600
|
includeSources(schema, sources);
|
|
600
601
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/load",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0-alpha-bdd7f13e.0",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
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-tools/schema": "8.
|
|
11
|
-
"@graphql-tools/utils": "8.
|
|
10
|
+
"@graphql-tools/schema": "8.4.0-alpha-bdd7f13e.0",
|
|
11
|
+
"@graphql-tools/utils": "8.7.0-alpha-bdd7f13e.0",
|
|
12
12
|
"p-limit": "3.1.0",
|
|
13
13
|
"tslib": "^2.4.0"
|
|
14
14
|
},
|