@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/index.esm.js CHANGED
@@ -518,12 +518,11 @@ const buildDelegationPlan = memoize3(function (mergedTypeInfo, fieldNodes, proxi
518
518
  return;
519
519
  }
520
520
  nonUniqueSubschemas = nonUniqueSubschemas.filter(s => proxiableSubschemas.includes(s));
521
- if (nonUniqueSubschemas == null) {
521
+ if (!nonUniqueSubschemas.length) {
522
522
  unproxiableFieldNodes.push(fieldNode);
523
523
  return;
524
524
  }
525
- const subschemas = Array.from(delegationMap.keys());
526
- const existingSubschema = nonUniqueSubschemas.find(s => subschemas.includes(s));
525
+ const existingSubschema = nonUniqueSubschemas.find(s => delegationMap.has(s));
527
526
  if (existingSubschema != null) {
528
527
  delegationMap.get(existingSubschema).push(fieldNode);
529
528
  }