@graphql-tools/delegate 12.0.13 → 12.0.14-rc-5a906028418f5bbf17b48c413ff5b4dec72d4adb

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @graphql-tools/delegate
2
2
 
3
+ ## 12.0.14-rc-5a906028418f5bbf17b48c413ff5b4dec72d4adb
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [#2243](https://github.com/graphql-hive/gateway/pull/2243) [`dff525f`](https://github.com/graphql-hive/gateway/commit/dff525f214d3525434c5a73a5b3fb22c46550163) Thanks [@qsona](https://github.com/qsona)! - Fix redundant type merging calls when subschemas have no explicit name.
9
+
10
+ The fallback name-based matching in `resolveExternalValue` (introduced in [#1557](https://github.com/graphql-hive/gateway/issues/1557)) incorrectly matched unrelated subschemas when neither had an explicit `name` set, because `undefined === undefined` evaluated to `true`. This caused type merging to trigger even when fetching a type directly from its source subschema, resulting in a redundant second call.
11
+
3
12
  ## 12.0.13
4
13
  ### Patch Changes
5
14
 
package/dist/index.cjs CHANGED
@@ -382,7 +382,7 @@ function resolveExternalObject(type, object, unpathedErrors, subschema, context,
382
382
  sourceSubschema,
383
383
  targetSubschemas
384
384
  ] of potentialMergedTypeInfo.targetSubschemas) {
385
- if (targetSubschemas.length && sourceSubschema.name === subschema.name) {
385
+ if (targetSubschemas.length && sourceSubschema.name != null && sourceSubschema.name === subschema.name) {
386
386
  subschema = sourceSubschema;
387
387
  mergedTypeInfo = potentialMergedTypeInfo;
388
388
  }
package/dist/index.js CHANGED
@@ -382,7 +382,7 @@ function resolveExternalObject(type, object, unpathedErrors, subschema, context,
382
382
  sourceSubschema,
383
383
  targetSubschemas
384
384
  ] of potentialMergedTypeInfo.targetSubschemas) {
385
- if (targetSubschemas.length && sourceSubschema.name === subschema.name) {
385
+ if (targetSubschemas.length && sourceSubschema.name != null && sourceSubschema.name === subschema.name) {
386
386
  subschema = sourceSubschema;
387
387
  mergedTypeInfo = potentialMergedTypeInfo;
388
388
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/delegate",
3
- "version": "12.0.13",
3
+ "version": "12.0.14-rc-5a906028418f5bbf17b48c413ff5b4dec72d4adb",
4
4
  "type": "module",
5
5
  "description": "A set of utils for faster development of GraphQL tools",
6
6
  "repository": {