@graphql-tools/delegate 8.4.2 → 8.4.3

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/README.md CHANGED
@@ -3,5 +3,3 @@ https://www.graphql-tools.com/docs/api/modules/delegate_src
3
3
 
4
4
  You can also learn more about Schema Delegation in this chapter;
5
5
  https://www.graphql-tools.com/docs/schema-delegation
6
-
7
-
package/index.js CHANGED
@@ -1251,13 +1251,13 @@ function validateRequest(delegationContext, document) {
1251
1251
  throw error.originalError || error;
1252
1252
  }
1253
1253
  }
1254
+ const GLOBAL_CONTEXT = {};
1254
1255
  function getExecutor(delegationContext) {
1255
- var _a, _b;
1256
1256
  const { subschemaConfig, targetSchema, context } = delegationContext;
1257
1257
  let executor = (subschemaConfig === null || subschemaConfig === void 0 ? void 0 : subschemaConfig.executor) || createDefaultExecutor(targetSchema);
1258
1258
  if (subschemaConfig === null || subschemaConfig === void 0 ? void 0 : subschemaConfig.batch) {
1259
1259
  const batchingOptions = subschemaConfig === null || subschemaConfig === void 0 ? void 0 : subschemaConfig.batchingOptions;
1260
- executor = batchExecute.getBatchingExecutor((_b = (_a = context !== null && context !== void 0 ? context : globalThis) !== null && _a !== void 0 ? _a : window) !== null && _b !== void 0 ? _b : global, executor, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.dataLoaderOptions, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.extensionsReducer);
1260
+ executor = batchExecute.getBatchingExecutor(context !== null && context !== void 0 ? context : GLOBAL_CONTEXT, executor, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.dataLoaderOptions, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.extensionsReducer);
1261
1261
  }
1262
1262
  return executor;
1263
1263
  }
package/index.mjs CHANGED
@@ -1247,13 +1247,13 @@ function validateRequest(delegationContext, document) {
1247
1247
  throw error.originalError || error;
1248
1248
  }
1249
1249
  }
1250
+ const GLOBAL_CONTEXT = {};
1250
1251
  function getExecutor(delegationContext) {
1251
- var _a, _b;
1252
1252
  const { subschemaConfig, targetSchema, context } = delegationContext;
1253
1253
  let executor = (subschemaConfig === null || subschemaConfig === void 0 ? void 0 : subschemaConfig.executor) || createDefaultExecutor(targetSchema);
1254
1254
  if (subschemaConfig === null || subschemaConfig === void 0 ? void 0 : subschemaConfig.batch) {
1255
1255
  const batchingOptions = subschemaConfig === null || subschemaConfig === void 0 ? void 0 : subschemaConfig.batchingOptions;
1256
- executor = getBatchingExecutor((_b = (_a = context !== null && context !== void 0 ? context : globalThis) !== null && _a !== void 0 ? _a : window) !== null && _b !== void 0 ? _b : global, executor, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.dataLoaderOptions, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.extensionsReducer);
1256
+ executor = getBatchingExecutor(context !== null && context !== void 0 ? context : GLOBAL_CONTEXT, executor, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.dataLoaderOptions, batchingOptions === null || batchingOptions === void 0 ? void 0 : batchingOptions.extensionsReducer);
1257
1257
  }
1258
1258
  return executor;
1259
1259
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/delegate",
3
- "version": "8.4.2",
3
+ "version": "8.4.3",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@graphql-tools/batch-execute": "^8.3.1",
11
11
  "@graphql-tools/schema": "^8.3.1",
12
- "@graphql-tools/utils": "^8.5.3",
12
+ "@graphql-tools/utils": "^8.5.4",
13
13
  "dataloader": "2.0.0",
14
14
  "tslib": "~2.3.0",
15
15
  "value-or-promise": "1.0.11"