@graphql-tools/delegate 7.0.9-alpha-08ab8c06.0 → 7.0.9
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 +2 -3
- package/es5/index.cjs.js.map +1 -1
- package/es5/index.esm.js +2 -3
- package/es5/index.esm.js.map +1 -1
- package/es5/package.json +5 -5
- package/es5/types.d.ts +2 -0
- package/index.cjs.js +2 -3
- package/index.cjs.js.map +1 -1
- package/index.esm.js +2 -3
- package/index.esm.js.map +1 -1
- package/package.json +5 -5
- package/types.d.ts +2 -0
package/es5/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/delegate/es5",
|
|
3
|
-
"version": "7.0.9
|
|
3
|
+
"version": "7.0.9",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@ardatan/aggregate-error": "0.0.6",
|
|
11
|
-
"@graphql-tools/batch-execute": "7.0.
|
|
12
|
-
"@graphql-tools/schema": "7.
|
|
13
|
-
"@graphql-tools/utils": "7.
|
|
11
|
+
"@graphql-tools/batch-execute": "^7.0.0",
|
|
12
|
+
"@graphql-tools/schema": "^7.0.0",
|
|
13
|
+
"@graphql-tools/utils": "^7.1.6",
|
|
14
14
|
"dataloader": "2.0.0",
|
|
15
15
|
"is-promise": "4.0.0",
|
|
16
|
-
"tslib": "~2.0
|
|
16
|
+
"tslib": "~2.1.0"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
package/es5/types.d.ts
CHANGED
|
@@ -118,11 +118,13 @@ export interface MergedTypeConfig<K = any, V = any> extends MergedTypeResolverOp
|
|
|
118
118
|
selectionSet?: string;
|
|
119
119
|
fields?: Record<string, {
|
|
120
120
|
selectionSet?: string;
|
|
121
|
+
canonical?: boolean;
|
|
121
122
|
}>;
|
|
122
123
|
computedFields?: Record<string, {
|
|
123
124
|
selectionSet?: string;
|
|
124
125
|
}>;
|
|
125
126
|
key?: (originalResult: any) => K;
|
|
127
|
+
canonical?: boolean;
|
|
126
128
|
resolve?: MergedTypeResolver;
|
|
127
129
|
}
|
|
128
130
|
export interface MergedTypeResolverOptions<K = any, V = any> {
|
package/index.cjs.js
CHANGED
|
@@ -524,12 +524,11 @@ const buildDelegationPlan = memoize3(function (mergedTypeInfo, fieldNodes, proxi
|
|
|
524
524
|
return;
|
|
525
525
|
}
|
|
526
526
|
nonUniqueSubschemas = nonUniqueSubschemas.filter(s => proxiableSubschemas.includes(s));
|
|
527
|
-
if (nonUniqueSubschemas
|
|
527
|
+
if (!nonUniqueSubschemas.length) {
|
|
528
528
|
unproxiableFieldNodes.push(fieldNode);
|
|
529
529
|
return;
|
|
530
530
|
}
|
|
531
|
-
const
|
|
532
|
-
const existingSubschema = nonUniqueSubschemas.find(s => subschemas.includes(s));
|
|
531
|
+
const existingSubschema = nonUniqueSubschemas.find(s => delegationMap.has(s));
|
|
533
532
|
if (existingSubschema != null) {
|
|
534
533
|
delegationMap.get(existingSubschema).push(fieldNode);
|
|
535
534
|
}
|