@graphql-tools/stitching-directives 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -352,6 +352,15 @@ function stitchingDirectivesTransformer(options = {}) {
352
352
  }
353
353
  entryPoints.push(newEntryPoint);
354
354
  }
355
+ if (entryPoints.length === 1) {
356
+ const [entryPoint] = entryPoints;
357
+ const { fields, canonical } = newMergeConfig[typeName];
358
+ newMergeConfig[typeName] = {
359
+ ...entryPoint,
360
+ fields,
361
+ canonical,
362
+ };
363
+ }
355
364
  }
356
365
  return newSubschemaConfig;
357
366
  };
@@ -349,6 +349,15 @@ export function stitchingDirectivesTransformer(options = {}) {
349
349
  }
350
350
  entryPoints.push(newEntryPoint);
351
351
  }
352
+ if (entryPoints.length === 1) {
353
+ const [entryPoint] = entryPoints;
354
+ const { fields, canonical } = newMergeConfig[typeName];
355
+ newMergeConfig[typeName] = {
356
+ ...entryPoint,
357
+ fields,
358
+ canonical,
359
+ };
360
+ }
352
361
  }
353
362
  return newSubschemaConfig;
354
363
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/stitching-directives",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {