@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 +0 -2
- package/index.js +2 -2
- package/index.mjs +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
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(
|
|
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(
|
|
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.
|
|
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.
|
|
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"
|