@graphql-tools/delegate 7.0.8-alpha-f9bebbe6.0 → 7.0.8
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 +7 -2
- package/es5/index.cjs.js.map +1 -1
- package/es5/index.esm.js +7 -2
- package/es5/index.esm.js.map +1 -1
- package/es5/package.json +9 -5
- package/es5/types.d.ts +1 -0
- package/index.cjs.js +7 -2
- package/index.cjs.js.map +1 -1
- package/index.esm.js +7 -2
- package/index.esm.js.map +1 -1
- package/package.json +9 -5
- package/types.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -617,8 +617,13 @@ function resolveExternalValue(result, unpathedErrors, subschema, context, info,
|
|
|
617
617
|
}
|
|
618
618
|
function resolveExternalObject(type, object, unpathedErrors, subschema, context, info, skipTypeMerging) {
|
|
619
619
|
var _a;
|
|
620
|
-
|
|
620
|
+
// if we have already resolved this object, for example, when the identical object appears twice
|
|
621
|
+
// in a list, see https://github.com/ardatan/graphql-tools/issues/2304
|
|
622
|
+
if (isExternalObject(object)) {
|
|
623
|
+
return object;
|
|
624
|
+
}
|
|
621
625
|
annotateExternalObject(object, unpathedErrors, subschema);
|
|
626
|
+
const stitchingInfo = (_a = info === null || info === void 0 ? void 0 : info.schema.extensions) === null || _a === void 0 ? void 0 : _a.stitchingInfo;
|
|
622
627
|
if (skipTypeMerging || !stitchingInfo) {
|
|
623
628
|
return object;
|
|
624
629
|
}
|
|
@@ -1523,7 +1528,7 @@ function defaultDelegationBinding(delegationContext) {
|
|
|
1523
1528
|
if (stitchingInfo != null) {
|
|
1524
1529
|
delegationTransforms = delegationTransforms.concat([
|
|
1525
1530
|
new ExpandAbstractTypes(),
|
|
1526
|
-
new AddSelectionSets(
|
|
1531
|
+
new AddSelectionSets(stitchingInfo.selectionSetsByType, stitchingInfo.selectionSetsByField, stitchingInfo.dynamicSelectionSetsByField),
|
|
1527
1532
|
new WrapConcreteTypes(),
|
|
1528
1533
|
]);
|
|
1529
1534
|
}
|