@graphql-tools/delegate 8.4.4-alpha-40340ed2.0 → 8.4.4-alpha-b935d9b2.0
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.js +3 -1
- package/index.mjs +4 -2
- package/package.json +5 -4
package/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const graphql = require('graphql');
|
|
6
6
|
const utils = require('@graphql-tools/utils');
|
|
7
|
+
const graphqlExecutor = require('graphql-executor');
|
|
7
8
|
const valueOrPromise = require('value-or-promise');
|
|
8
9
|
const batchExecute = require('@graphql-tools/batch-execute');
|
|
9
10
|
|
|
@@ -1262,6 +1263,7 @@ function getExecutor(delegationContext) {
|
|
|
1262
1263
|
return executor;
|
|
1263
1264
|
}
|
|
1264
1265
|
const createDefaultExecutor = utils.memoize1(function createDefaultExecutor(schema) {
|
|
1266
|
+
const executor = new graphqlExecutor.Executor({ schema });
|
|
1265
1267
|
return function defaultExecutor(request) {
|
|
1266
1268
|
const operationAst = utils.getOperationASTFromRequest(request);
|
|
1267
1269
|
const executionArgs = {
|
|
@@ -1275,7 +1277,7 @@ const createDefaultExecutor = utils.memoize1(function createDefaultExecutor(sche
|
|
|
1275
1277
|
if (operationAst.operation === 'subscription') {
|
|
1276
1278
|
return graphql.subscribe(executionArgs);
|
|
1277
1279
|
}
|
|
1278
|
-
return
|
|
1280
|
+
return executor.execute(executionArgs);
|
|
1279
1281
|
};
|
|
1280
1282
|
});
|
|
1281
1283
|
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Kind, isAbstractType, isInterfaceType, TypeInfo, visit, visitWithTypeInfo, getNamedType, isObjectType, versionInfo, TypeNameMetaFieldDef, responsePathAsArray, GraphQLError, locatedError, getNullableType, isCompositeType, isListType, typeFromAST, defaultFieldResolver, validate, subscribe
|
|
1
|
+
import { Kind, isAbstractType, isInterfaceType, TypeInfo, visit, visitWithTypeInfo, getNamedType, isObjectType, versionInfo, TypeNameMetaFieldDef, responsePathAsArray, GraphQLError, locatedError, getNullableType, isCompositeType, isListType, typeFromAST, defaultFieldResolver, validate, subscribe } from 'graphql';
|
|
2
2
|
import { memoize2, implementsAbstractType, getRootTypeNames, getDefinedRootType, createVariableNameGenerator, updateArgument, serializeInputValue, inspect, collectFields, relocatedError, AggregateError, getResponseKeyFromInfo, isAsyncIterable, mapAsyncIterator, getOperationASTFromRequest, memoize1 } from '@graphql-tools/utils';
|
|
3
|
+
import { Executor } from 'graphql-executor';
|
|
3
4
|
import { ValueOrPromise } from 'value-or-promise';
|
|
4
5
|
import { getBatchingExecutor } from '@graphql-tools/batch-execute';
|
|
5
6
|
|
|
@@ -1258,6 +1259,7 @@ function getExecutor(delegationContext) {
|
|
|
1258
1259
|
return executor;
|
|
1259
1260
|
}
|
|
1260
1261
|
const createDefaultExecutor = memoize1(function createDefaultExecutor(schema) {
|
|
1262
|
+
const executor = new Executor({ schema });
|
|
1261
1263
|
return function defaultExecutor(request) {
|
|
1262
1264
|
const operationAst = getOperationASTFromRequest(request);
|
|
1263
1265
|
const executionArgs = {
|
|
@@ -1271,7 +1273,7 @@ const createDefaultExecutor = memoize1(function createDefaultExecutor(schema) {
|
|
|
1271
1273
|
if (operationAst.operation === 'subscription') {
|
|
1272
1274
|
return subscribe(executionArgs);
|
|
1273
1275
|
}
|
|
1274
|
-
return execute(executionArgs);
|
|
1276
|
+
return executor.execute(executionArgs);
|
|
1275
1277
|
};
|
|
1276
1278
|
});
|
|
1277
1279
|
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/delegate",
|
|
3
|
-
"version": "8.4.4-alpha-
|
|
3
|
+
"version": "8.4.4-alpha-b935d9b2.0",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-tools/batch-execute": "8.3.2-alpha-
|
|
11
|
-
"@graphql-tools/schema": "8.3.2-alpha-
|
|
12
|
-
"@graphql-tools/utils": "8.6.1-alpha-
|
|
10
|
+
"@graphql-tools/batch-execute": "8.3.2-alpha-b935d9b2.0",
|
|
11
|
+
"@graphql-tools/schema": "8.3.2-alpha-b935d9b2.0",
|
|
12
|
+
"@graphql-tools/utils": "8.6.1-alpha-b935d9b2.0",
|
|
13
13
|
"dataloader": "2.0.0",
|
|
14
|
+
"graphql-executor": "0.0.14",
|
|
14
15
|
"tslib": "~2.3.0",
|
|
15
16
|
"value-or-promise": "1.0.11"
|
|
16
17
|
},
|