@graphql-tools/executor
Advanced tools
Comparing version 1.3.7 to 1.3.8
@@ -393,2 +393,3 @@ "use strict"; | ||
variableValues: exeContext.variableValues, | ||
signal: exeContext.signal, | ||
}; | ||
@@ -505,3 +506,3 @@ } | ||
iterator.return?.(); | ||
}); | ||
}, { once: true }); | ||
const errors = asyncPayloadRecord?.errors ?? exeContext.errors; | ||
@@ -1196,3 +1197,3 @@ const stream = getStreamValues(exeContext, fieldNodes, path); | ||
reject(exeContext.signal?.reason); | ||
}); | ||
}, { once: true }); | ||
}); | ||
@@ -1246,3 +1247,3 @@ async function next() { | ||
isDone = true; | ||
return Promise.reject(error); | ||
throw error; | ||
}, | ||
@@ -1249,0 +1250,0 @@ async [disposablestack_1.DisposableSymbols.asyncDispose]() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.executorFromSchema = void 0; | ||
exports.normalizedExecutor = normalizedExecutor; | ||
const graphql_1 = require("graphql"); | ||
const value_or_promise_1 = require("value-or-promise"); | ||
const utils_1 = require("@graphql-tools/utils"); | ||
const execute_js_1 = require("./execute.js"); | ||
@@ -24,1 +26,14 @@ function normalizedExecutor(args) { | ||
} | ||
exports.executorFromSchema = (0, utils_1.memoize1)(function executorFromSchema(schema) { | ||
return function schemaExecutor(request) { | ||
return normalizedExecutor({ | ||
schema, | ||
document: request.document, | ||
variableValues: request.variables, | ||
operationName: request.operationName, | ||
rootValue: request.rootValue, | ||
contextValue: request.context, | ||
signal: request.signal || request.info?.signal, | ||
}); | ||
}; | ||
}); |
@@ -381,2 +381,3 @@ import { assertValidSchema, getDirectiveValues, GraphQLError, isAbstractType, isLeafType, isListType, isNonNullType, isObjectType, Kind, locatedError, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef, versionInfo, } from 'graphql'; | ||
variableValues: exeContext.variableValues, | ||
signal: exeContext.signal, | ||
}; | ||
@@ -493,3 +494,3 @@ } | ||
iterator.return?.(); | ||
}); | ||
}, { once: true }); | ||
const errors = asyncPayloadRecord?.errors ?? exeContext.errors; | ||
@@ -1182,3 +1183,3 @@ const stream = getStreamValues(exeContext, fieldNodes, path); | ||
reject(exeContext.signal?.reason); | ||
}); | ||
}, { once: true }); | ||
}); | ||
@@ -1232,3 +1233,3 @@ async function next() { | ||
isDone = true; | ||
return Promise.reject(error); | ||
throw error; | ||
}, | ||
@@ -1235,0 +1236,0 @@ async [DisposableSymbols.asyncDispose]() { |
import { getOperationAST } from 'graphql'; | ||
import { ValueOrPromise } from 'value-or-promise'; | ||
import { memoize1, } from '@graphql-tools/utils'; | ||
import { execute, flattenIncrementalResults, subscribe } from './execute.js'; | ||
@@ -21,1 +22,14 @@ export function normalizedExecutor(args) { | ||
} | ||
export const executorFromSchema = memoize1(function executorFromSchema(schema) { | ||
return function schemaExecutor(request) { | ||
return normalizedExecutor({ | ||
schema, | ||
document: request.document, | ||
variableValues: request.variables, | ||
operationName: request.operationName, | ||
rootValue: request.rootValue, | ||
contextValue: request.context, | ||
signal: request.signal || request.info?.signal, | ||
}); | ||
}; | ||
}); |
{ | ||
"name": "@graphql-tools/executor", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"sideEffects": false, | ||
@@ -9,3 +9,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@graphql-tools/utils": "^10.6.2", | ||
"@graphql-tools/utils": "^10.6.3", | ||
"@graphql-typed-document-node/core": "^3.2.0", | ||
@@ -12,0 +12,0 @@ "@repeaterjs/repeater": "^3.0.4", |
@@ -1,3 +0,3 @@ | ||
import { DocumentNode, FieldNode, FragmentDefinitionNode, GraphQLError, GraphQLField, GraphQLFieldResolver, GraphQLFormattedError, GraphQLObjectType, GraphQLResolveInfo, GraphQLSchema, GraphQLTypeResolver, OperationDefinitionNode } from 'graphql'; | ||
import { Maybe, MaybePromise, Path } from '@graphql-tools/utils'; | ||
import { DocumentNode, FieldNode, FragmentDefinitionNode, GraphQLError, GraphQLField, GraphQLFieldResolver, GraphQLFormattedError, GraphQLObjectType, GraphQLSchema, GraphQLTypeResolver, OperationDefinitionNode } from 'graphql'; | ||
import { GraphQLResolveInfo, Maybe, MaybePromise, Path } from '@graphql-tools/utils'; | ||
import { TypedDocumentNode } from '@graphql-typed-document-node/core'; | ||
@@ -4,0 +4,0 @@ export interface SingularExecutionResult<TData = any, TExtensions = any> { |
@@ -1,3 +0,5 @@ | ||
import { ExecutionResult, MaybeAsyncIterable, MaybePromise } from '@graphql-tools/utils'; | ||
import { GraphQLSchema } from 'graphql'; | ||
import { ExecutionResult, Executor, MaybeAsyncIterable, MaybePromise } from '@graphql-tools/utils'; | ||
import { ExecutionArgs } from './execute.js'; | ||
export declare function normalizedExecutor<TData = any, TVariables = any, TContext = any>(args: ExecutionArgs<TData, TVariables, TContext>): MaybePromise<MaybeAsyncIterable<ExecutionResult<TData>>>; | ||
export declare const executorFromSchema: (schema: GraphQLSchema) => Executor; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171406
3571
Updated@graphql-tools/utils@^10.6.3