graphql 17.0.0-alpha.8 → 17.0.0-beta.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/README.md +54 -10
- package/__dev__/devMode.d.mts +1 -0
- package/__dev__/devMode.d.ts +1 -0
- package/__dev__/devMode.js +3 -0
- package/__dev__/devMode.mjs +3 -0
- package/__dev__/error/GraphQLError.d.mts +1 -0
- package/__dev__/error/GraphQLError.d.ts +1 -0
- package/__dev__/error/GraphQLError.js +3 -0
- package/__dev__/error/GraphQLError.mjs +3 -0
- package/__dev__/error/ensureGraphQLError.d.mts +1 -0
- package/__dev__/error/ensureGraphQLError.d.ts +1 -0
- package/__dev__/error/ensureGraphQLError.js +3 -0
- package/__dev__/error/ensureGraphQLError.mjs +3 -0
- package/__dev__/error/index.d.mts +1 -0
- package/__dev__/error/index.d.ts +1 -0
- package/__dev__/error/index.js +3 -0
- package/__dev__/error/index.mjs +3 -0
- package/__dev__/error/locatedError.d.mts +1 -0
- package/__dev__/error/locatedError.d.ts +1 -0
- package/__dev__/error/locatedError.js +3 -0
- package/__dev__/error/locatedError.mjs +3 -0
- package/__dev__/error/syntaxError.d.mts +1 -0
- package/__dev__/error/syntaxError.d.ts +1 -0
- package/__dev__/error/syntaxError.js +3 -0
- package/__dev__/error/syntaxError.mjs +3 -0
- package/__dev__/execution/AbortedGraphQLExecutionError.d.mts +1 -0
- package/__dev__/execution/AbortedGraphQLExecutionError.d.ts +1 -0
- package/__dev__/execution/AbortedGraphQLExecutionError.js +3 -0
- package/__dev__/execution/AbortedGraphQLExecutionError.mjs +3 -0
- package/__dev__/execution/AsyncWorkTracker.d.mts +1 -0
- package/__dev__/execution/AsyncWorkTracker.d.ts +1 -0
- package/__dev__/execution/AsyncWorkTracker.js +3 -0
- package/__dev__/execution/AsyncWorkTracker.mjs +3 -0
- package/__dev__/execution/Executor.d.mts +1 -0
- package/__dev__/execution/Executor.d.ts +1 -0
- package/__dev__/execution/Executor.js +3 -0
- package/__dev__/execution/Executor.mjs +3 -0
- package/__dev__/execution/ExecutorThrowingOnIncremental.d.mts +1 -0
- package/__dev__/execution/ExecutorThrowingOnIncremental.d.ts +1 -0
- package/__dev__/execution/ExecutorThrowingOnIncremental.js +3 -0
- package/__dev__/execution/ExecutorThrowingOnIncremental.mjs +3 -0
- package/__dev__/execution/cancellablePromise.d.mts +1 -0
- package/__dev__/execution/cancellablePromise.d.ts +1 -0
- package/__dev__/execution/cancellablePromise.js +3 -0
- package/__dev__/execution/cancellablePromise.mjs +3 -0
- package/__dev__/execution/collectFields.d.mts +1 -0
- package/__dev__/execution/collectFields.d.ts +1 -0
- package/__dev__/execution/collectFields.js +3 -0
- package/__dev__/execution/collectFields.mjs +3 -0
- package/__dev__/execution/collectIteratorPromises.d.mts +1 -0
- package/__dev__/execution/collectIteratorPromises.d.ts +1 -0
- package/__dev__/execution/collectIteratorPromises.js +3 -0
- package/__dev__/execution/collectIteratorPromises.mjs +3 -0
- package/__dev__/execution/createSharedExecutionContext.d.mts +1 -0
- package/__dev__/execution/createSharedExecutionContext.d.ts +1 -0
- package/__dev__/execution/createSharedExecutionContext.js +3 -0
- package/__dev__/execution/createSharedExecutionContext.mjs +3 -0
- package/__dev__/execution/execute.d.mts +1 -0
- package/__dev__/execution/execute.d.ts +1 -0
- package/__dev__/execution/execute.js +3 -0
- package/__dev__/execution/execute.mjs +3 -0
- package/__dev__/execution/getStreamUsage.d.mts +1 -0
- package/__dev__/execution/getStreamUsage.d.ts +1 -0
- package/__dev__/execution/getStreamUsage.js +3 -0
- package/__dev__/execution/getStreamUsage.mjs +3 -0
- package/__dev__/execution/getVariableSignature.d.mts +1 -0
- package/__dev__/execution/getVariableSignature.d.ts +1 -0
- package/__dev__/execution/getVariableSignature.js +3 -0
- package/__dev__/execution/getVariableSignature.mjs +3 -0
- package/__dev__/execution/hooks.d.mts +1 -0
- package/__dev__/execution/hooks.d.ts +1 -0
- package/__dev__/execution/hooks.js +3 -0
- package/__dev__/execution/hooks.mjs +3 -0
- package/__dev__/execution/incremental/Computation.d.mts +1 -0
- package/__dev__/execution/incremental/Computation.d.ts +1 -0
- package/__dev__/execution/incremental/Computation.js +3 -0
- package/__dev__/execution/incremental/Computation.mjs +3 -0
- package/__dev__/execution/incremental/IncrementalExecutor.d.mts +1 -0
- package/__dev__/execution/incremental/IncrementalExecutor.d.ts +1 -0
- package/__dev__/execution/incremental/IncrementalExecutor.js +3 -0
- package/__dev__/execution/incremental/IncrementalExecutor.mjs +3 -0
- package/__dev__/execution/incremental/IncrementalPublisher.d.mts +1 -0
- package/__dev__/execution/incremental/IncrementalPublisher.d.ts +1 -0
- package/__dev__/execution/incremental/IncrementalPublisher.js +3 -0
- package/__dev__/execution/incremental/IncrementalPublisher.mjs +3 -0
- package/__dev__/execution/incremental/Queue.d.mts +1 -0
- package/__dev__/execution/incremental/Queue.d.ts +1 -0
- package/__dev__/execution/incremental/Queue.js +3 -0
- package/__dev__/execution/incremental/Queue.mjs +3 -0
- package/__dev__/execution/incremental/WorkQueue.d.mts +1 -0
- package/__dev__/execution/incremental/WorkQueue.d.ts +1 -0
- package/__dev__/execution/incremental/WorkQueue.js +3 -0
- package/__dev__/execution/incremental/WorkQueue.mjs +3 -0
- package/__dev__/execution/incremental/buildExecutionPlan.d.mts +1 -0
- package/__dev__/execution/incremental/buildExecutionPlan.d.ts +1 -0
- package/__dev__/execution/incremental/buildExecutionPlan.js +3 -0
- package/__dev__/execution/incremental/buildExecutionPlan.mjs +3 -0
- package/__dev__/execution/index.d.mts +1 -0
- package/__dev__/execution/index.d.ts +1 -0
- package/__dev__/execution/index.js +3 -0
- package/__dev__/execution/index.mjs +3 -0
- package/__dev__/execution/mapAsyncIterable.d.mts +1 -0
- package/__dev__/execution/mapAsyncIterable.d.ts +1 -0
- package/__dev__/execution/mapAsyncIterable.js +3 -0
- package/__dev__/execution/mapAsyncIterable.mjs +3 -0
- package/__dev__/execution/returnIteratorCatchingErrors.d.mts +1 -0
- package/__dev__/execution/returnIteratorCatchingErrors.d.ts +1 -0
- package/__dev__/execution/returnIteratorCatchingErrors.js +3 -0
- package/__dev__/execution/returnIteratorCatchingErrors.mjs +3 -0
- package/__dev__/execution/values.d.mts +1 -0
- package/__dev__/execution/values.d.ts +1 -0
- package/__dev__/execution/values.js +3 -0
- package/__dev__/execution/values.mjs +3 -0
- package/__dev__/execution/withConcurrentAbruptClose.d.mts +1 -0
- package/__dev__/execution/withConcurrentAbruptClose.d.ts +1 -0
- package/__dev__/execution/withConcurrentAbruptClose.js +3 -0
- package/__dev__/execution/withConcurrentAbruptClose.mjs +3 -0
- package/__dev__/graphql.d.mts +1 -0
- package/__dev__/graphql.d.ts +1 -0
- package/__dev__/graphql.js +3 -0
- package/__dev__/graphql.mjs +3 -0
- package/__dev__/harness.d.mts +1 -0
- package/__dev__/harness.d.ts +1 -0
- package/__dev__/harness.js +3 -0
- package/__dev__/harness.mjs +3 -0
- package/__dev__/index.d.mts +1 -0
- package/__dev__/index.d.ts +1 -0
- package/__dev__/index.js +3 -0
- package/__dev__/index.mjs +3 -0
- package/__dev__/jsutils/AccumulatorMap.d.mts +1 -0
- package/__dev__/jsutils/AccumulatorMap.d.ts +1 -0
- package/__dev__/jsutils/AccumulatorMap.js +3 -0
- package/__dev__/jsutils/AccumulatorMap.mjs +3 -0
- package/__dev__/jsutils/Maybe.d.mts +1 -0
- package/__dev__/jsutils/Maybe.d.ts +1 -0
- package/__dev__/jsutils/Maybe.js +3 -0
- package/__dev__/jsutils/Maybe.mjs +3 -0
- package/__dev__/jsutils/ObjMap.d.mts +1 -0
- package/__dev__/jsutils/ObjMap.d.ts +1 -0
- package/__dev__/jsutils/ObjMap.js +3 -0
- package/__dev__/jsutils/ObjMap.mjs +3 -0
- package/__dev__/jsutils/Path.d.mts +1 -0
- package/__dev__/jsutils/Path.d.ts +1 -0
- package/__dev__/jsutils/Path.js +3 -0
- package/__dev__/jsutils/Path.mjs +3 -0
- package/__dev__/jsutils/PromiseOrValue.d.mts +1 -0
- package/__dev__/jsutils/PromiseOrValue.d.ts +1 -0
- package/__dev__/jsutils/PromiseOrValue.js +3 -0
- package/__dev__/jsutils/PromiseOrValue.mjs +3 -0
- package/__dev__/jsutils/capitalize.d.mts +1 -0
- package/__dev__/jsutils/capitalize.d.ts +1 -0
- package/__dev__/jsutils/capitalize.js +3 -0
- package/__dev__/jsutils/capitalize.mjs +3 -0
- package/__dev__/jsutils/devAssert.d.mts +1 -0
- package/__dev__/jsutils/devAssert.d.ts +1 -0
- package/__dev__/jsutils/devAssert.js +3 -0
- package/__dev__/jsutils/devAssert.mjs +3 -0
- package/__dev__/jsutils/didYouMean.d.mts +1 -0
- package/__dev__/jsutils/didYouMean.d.ts +1 -0
- package/__dev__/jsutils/didYouMean.js +3 -0
- package/__dev__/jsutils/didYouMean.mjs +3 -0
- package/__dev__/jsutils/formatList.d.mts +1 -0
- package/__dev__/jsutils/formatList.d.ts +1 -0
- package/__dev__/jsutils/formatList.js +3 -0
- package/__dev__/jsutils/formatList.mjs +3 -0
- package/__dev__/jsutils/getBySet.d.mts +1 -0
- package/__dev__/jsutils/getBySet.d.ts +1 -0
- package/__dev__/jsutils/getBySet.js +3 -0
- package/__dev__/jsutils/getBySet.mjs +3 -0
- package/__dev__/jsutils/groupBy.d.mts +1 -0
- package/__dev__/jsutils/groupBy.d.ts +1 -0
- package/__dev__/jsutils/groupBy.js +3 -0
- package/__dev__/jsutils/groupBy.mjs +3 -0
- package/__dev__/jsutils/identityFunc.d.mts +1 -0
- package/__dev__/jsutils/identityFunc.d.ts +1 -0
- package/__dev__/jsutils/identityFunc.js +3 -0
- package/__dev__/jsutils/identityFunc.mjs +3 -0
- package/__dev__/jsutils/inspect.d.mts +1 -0
- package/__dev__/jsutils/inspect.d.ts +1 -0
- package/__dev__/jsutils/inspect.js +3 -0
- package/__dev__/jsutils/inspect.mjs +3 -0
- package/__dev__/jsutils/instanceOf.d.mts +1 -0
- package/__dev__/jsutils/instanceOf.d.ts +1 -0
- package/__dev__/jsutils/instanceOf.js +3 -0
- package/__dev__/jsutils/instanceOf.mjs +3 -0
- package/__dev__/jsutils/invariant.d.mts +1 -0
- package/__dev__/jsutils/invariant.d.ts +1 -0
- package/__dev__/jsutils/invariant.js +3 -0
- package/__dev__/jsutils/invariant.mjs +3 -0
- package/__dev__/jsutils/isAsyncIterable.d.mts +1 -0
- package/__dev__/jsutils/isAsyncIterable.d.ts +1 -0
- package/__dev__/jsutils/isAsyncIterable.js +3 -0
- package/__dev__/jsutils/isAsyncIterable.mjs +3 -0
- package/__dev__/jsutils/isIterableObject.d.mts +1 -0
- package/__dev__/jsutils/isIterableObject.d.ts +1 -0
- package/__dev__/jsutils/isIterableObject.js +3 -0
- package/__dev__/jsutils/isIterableObject.mjs +3 -0
- package/__dev__/jsutils/isObjectLike.d.mts +1 -0
- package/__dev__/jsutils/isObjectLike.d.ts +1 -0
- package/__dev__/jsutils/isObjectLike.js +3 -0
- package/__dev__/jsutils/isObjectLike.mjs +3 -0
- package/__dev__/jsutils/isPromise.d.mts +1 -0
- package/__dev__/jsutils/isPromise.d.ts +1 -0
- package/__dev__/jsutils/isPromise.js +3 -0
- package/__dev__/jsutils/isPromise.mjs +3 -0
- package/__dev__/jsutils/isSameSet.d.mts +1 -0
- package/__dev__/jsutils/isSameSet.d.ts +1 -0
- package/__dev__/jsutils/isSameSet.js +3 -0
- package/__dev__/jsutils/isSameSet.mjs +3 -0
- package/__dev__/jsutils/keyMap.d.mts +1 -0
- package/__dev__/jsutils/keyMap.d.ts +1 -0
- package/__dev__/jsutils/keyMap.js +3 -0
- package/__dev__/jsutils/keyMap.mjs +3 -0
- package/__dev__/jsutils/keyValMap.d.mts +1 -0
- package/__dev__/jsutils/keyValMap.d.ts +1 -0
- package/__dev__/jsutils/keyValMap.js +3 -0
- package/__dev__/jsutils/keyValMap.mjs +3 -0
- package/__dev__/jsutils/mapValue.d.mts +1 -0
- package/__dev__/jsutils/mapValue.d.ts +1 -0
- package/__dev__/jsutils/mapValue.js +3 -0
- package/__dev__/jsutils/mapValue.mjs +3 -0
- package/__dev__/jsutils/memoize1.d.mts +1 -0
- package/__dev__/jsutils/memoize1.d.ts +1 -0
- package/__dev__/jsutils/memoize1.js +3 -0
- package/__dev__/jsutils/memoize1.mjs +3 -0
- package/__dev__/jsutils/memoize2.d.mts +1 -0
- package/__dev__/jsutils/memoize2.d.ts +1 -0
- package/__dev__/jsutils/memoize2.js +3 -0
- package/__dev__/jsutils/memoize2.mjs +3 -0
- package/__dev__/jsutils/memoize3.d.mts +1 -0
- package/__dev__/jsutils/memoize3.d.ts +1 -0
- package/__dev__/jsutils/memoize3.js +3 -0
- package/__dev__/jsutils/memoize3.mjs +3 -0
- package/__dev__/jsutils/naturalCompare.d.mts +1 -0
- package/__dev__/jsutils/naturalCompare.d.ts +1 -0
- package/__dev__/jsutils/naturalCompare.js +3 -0
- package/__dev__/jsutils/naturalCompare.mjs +3 -0
- package/__dev__/jsutils/printPathArray.d.mts +1 -0
- package/__dev__/jsutils/printPathArray.d.ts +1 -0
- package/__dev__/jsutils/printPathArray.js +3 -0
- package/__dev__/jsutils/printPathArray.mjs +3 -0
- package/__dev__/jsutils/promiseForObject.d.mts +1 -0
- package/__dev__/jsutils/promiseForObject.d.ts +1 -0
- package/__dev__/jsutils/promiseForObject.js +3 -0
- package/__dev__/jsutils/promiseForObject.mjs +3 -0
- package/__dev__/jsutils/promiseReduce.d.mts +1 -0
- package/__dev__/jsutils/promiseReduce.d.ts +1 -0
- package/__dev__/jsutils/promiseReduce.js +3 -0
- package/__dev__/jsutils/promiseReduce.mjs +3 -0
- package/__dev__/jsutils/promiseWithResolvers.d.mts +1 -0
- package/__dev__/jsutils/promiseWithResolvers.d.ts +1 -0
- package/__dev__/jsutils/promiseWithResolvers.js +3 -0
- package/__dev__/jsutils/promiseWithResolvers.mjs +3 -0
- package/__dev__/jsutils/suggestionList.d.mts +1 -0
- package/__dev__/jsutils/suggestionList.d.ts +1 -0
- package/__dev__/jsutils/suggestionList.js +3 -0
- package/__dev__/jsutils/suggestionList.mjs +3 -0
- package/__dev__/jsutils/toError.d.mts +1 -0
- package/__dev__/jsutils/toError.d.ts +1 -0
- package/__dev__/jsutils/toError.js +3 -0
- package/__dev__/jsutils/toError.mjs +3 -0
- package/__dev__/jsutils/toObjMap.d.mts +1 -0
- package/__dev__/jsutils/toObjMap.d.ts +1 -0
- package/__dev__/jsutils/toObjMap.js +3 -0
- package/__dev__/jsutils/toObjMap.mjs +3 -0
- package/__dev__/language/KindTypeMap.d.mts +1 -0
- package/__dev__/language/KindTypeMap.d.ts +1 -0
- package/__dev__/language/KindTypeMap.js +3 -0
- package/__dev__/language/KindTypeMap.mjs +3 -0
- package/__dev__/language/ast.d.mts +1 -0
- package/__dev__/language/ast.d.ts +1 -0
- package/__dev__/language/ast.js +3 -0
- package/__dev__/language/ast.mjs +3 -0
- package/__dev__/language/blockString.d.mts +1 -0
- package/__dev__/language/blockString.d.ts +1 -0
- package/__dev__/language/blockString.js +3 -0
- package/__dev__/language/blockString.mjs +3 -0
- package/__dev__/language/characterClasses.d.mts +1 -0
- package/__dev__/language/characterClasses.d.ts +1 -0
- package/__dev__/language/characterClasses.js +3 -0
- package/__dev__/language/characterClasses.mjs +3 -0
- package/__dev__/language/directiveLocation.d.mts +1 -0
- package/__dev__/language/directiveLocation.d.ts +1 -0
- package/__dev__/language/directiveLocation.js +3 -0
- package/__dev__/language/directiveLocation.mjs +3 -0
- package/__dev__/language/index.d.mts +1 -0
- package/__dev__/language/index.d.ts +1 -0
- package/__dev__/language/index.js +3 -0
- package/__dev__/language/index.mjs +3 -0
- package/__dev__/language/kinds.d.mts +1 -0
- package/__dev__/language/kinds.d.ts +1 -0
- package/__dev__/language/kinds.js +3 -0
- package/__dev__/language/kinds.mjs +3 -0
- package/__dev__/language/kinds_.d.mts +1 -0
- package/__dev__/language/kinds_.d.ts +1 -0
- package/__dev__/language/kinds_.js +3 -0
- package/__dev__/language/kinds_.mjs +3 -0
- package/__dev__/language/lexer.d.mts +1 -0
- package/__dev__/language/lexer.d.ts +1 -0
- package/__dev__/language/lexer.js +3 -0
- package/__dev__/language/lexer.mjs +3 -0
- package/__dev__/language/location.d.mts +1 -0
- package/__dev__/language/location.d.ts +1 -0
- package/__dev__/language/location.js +3 -0
- package/__dev__/language/location.mjs +3 -0
- package/__dev__/language/parser.d.mts +1 -0
- package/__dev__/language/parser.d.ts +1 -0
- package/__dev__/language/parser.js +3 -0
- package/__dev__/language/parser.mjs +3 -0
- package/__dev__/language/predicates.d.mts +1 -0
- package/__dev__/language/predicates.d.ts +1 -0
- package/__dev__/language/predicates.js +3 -0
- package/__dev__/language/predicates.mjs +3 -0
- package/__dev__/language/printLocation.d.mts +1 -0
- package/__dev__/language/printLocation.d.ts +1 -0
- package/__dev__/language/printLocation.js +3 -0
- package/__dev__/language/printLocation.mjs +3 -0
- package/__dev__/language/printString.d.mts +1 -0
- package/__dev__/language/printString.d.ts +1 -0
- package/__dev__/language/printString.js +3 -0
- package/__dev__/language/printString.mjs +3 -0
- package/__dev__/language/printer.d.mts +1 -0
- package/__dev__/language/printer.d.ts +1 -0
- package/__dev__/language/printer.js +3 -0
- package/__dev__/language/printer.mjs +3 -0
- package/__dev__/language/schemaCoordinateLexer.d.mts +1 -0
- package/__dev__/language/schemaCoordinateLexer.d.ts +1 -0
- package/__dev__/language/schemaCoordinateLexer.js +3 -0
- package/__dev__/language/schemaCoordinateLexer.mjs +3 -0
- package/__dev__/language/source.d.mts +1 -0
- package/__dev__/language/source.d.ts +1 -0
- package/__dev__/language/source.js +3 -0
- package/__dev__/language/source.mjs +3 -0
- package/__dev__/language/tokenKind.d.mts +1 -0
- package/__dev__/language/tokenKind.d.ts +1 -0
- package/__dev__/language/tokenKind.js +3 -0
- package/__dev__/language/tokenKind.mjs +3 -0
- package/__dev__/language/visitor.d.mts +1 -0
- package/__dev__/language/visitor.d.ts +1 -0
- package/__dev__/language/visitor.js +3 -0
- package/__dev__/language/visitor.mjs +3 -0
- package/__dev__/type/assertName.d.mts +1 -0
- package/__dev__/type/assertName.d.ts +1 -0
- package/__dev__/type/assertName.js +3 -0
- package/__dev__/type/assertName.mjs +3 -0
- package/__dev__/type/definition.d.mts +1 -0
- package/__dev__/type/definition.d.ts +1 -0
- package/__dev__/type/definition.js +3 -0
- package/__dev__/type/definition.mjs +3 -0
- package/__dev__/type/directives.d.mts +1 -0
- package/__dev__/type/directives.d.ts +1 -0
- package/__dev__/type/directives.js +3 -0
- package/__dev__/type/directives.mjs +3 -0
- package/__dev__/type/index.d.mts +1 -0
- package/__dev__/type/index.d.ts +1 -0
- package/__dev__/type/index.js +3 -0
- package/__dev__/type/index.mjs +3 -0
- package/__dev__/type/introspection.d.mts +1 -0
- package/__dev__/type/introspection.d.ts +1 -0
- package/__dev__/type/introspection.js +3 -0
- package/__dev__/type/introspection.mjs +3 -0
- package/__dev__/type/scalars.d.mts +1 -0
- package/__dev__/type/scalars.d.ts +1 -0
- package/__dev__/type/scalars.js +3 -0
- package/__dev__/type/scalars.mjs +3 -0
- package/__dev__/type/schema.d.mts +1 -0
- package/__dev__/type/schema.d.ts +1 -0
- package/__dev__/type/schema.js +3 -0
- package/__dev__/type/schema.mjs +3 -0
- package/__dev__/type/validate.d.mts +1 -0
- package/__dev__/type/validate.d.ts +1 -0
- package/__dev__/type/validate.js +3 -0
- package/__dev__/type/validate.mjs +3 -0
- package/__dev__/utilities/TypeInfo.d.mts +1 -0
- package/__dev__/utilities/TypeInfo.d.ts +1 -0
- package/__dev__/utilities/TypeInfo.js +3 -0
- package/__dev__/utilities/TypeInfo.mjs +3 -0
- package/__dev__/utilities/astFromValue.d.mts +1 -0
- package/__dev__/utilities/astFromValue.d.ts +1 -0
- package/__dev__/utilities/astFromValue.js +3 -0
- package/__dev__/utilities/astFromValue.mjs +3 -0
- package/__dev__/utilities/buildASTSchema.d.mts +1 -0
- package/__dev__/utilities/buildASTSchema.d.ts +1 -0
- package/__dev__/utilities/buildASTSchema.js +3 -0
- package/__dev__/utilities/buildASTSchema.mjs +3 -0
- package/__dev__/utilities/buildClientSchema.d.mts +1 -0
- package/__dev__/utilities/buildClientSchema.d.ts +1 -0
- package/__dev__/utilities/buildClientSchema.js +3 -0
- package/__dev__/utilities/buildClientSchema.mjs +3 -0
- package/__dev__/utilities/coerceInputValue.d.mts +1 -0
- package/__dev__/utilities/coerceInputValue.d.ts +1 -0
- package/__dev__/utilities/coerceInputValue.js +3 -0
- package/__dev__/utilities/coerceInputValue.mjs +3 -0
- package/__dev__/utilities/concatAST.d.mts +1 -0
- package/__dev__/utilities/concatAST.d.ts +1 -0
- package/__dev__/utilities/concatAST.js +3 -0
- package/__dev__/utilities/concatAST.mjs +3 -0
- package/__dev__/utilities/extendSchema.d.mts +1 -0
- package/__dev__/utilities/extendSchema.d.ts +1 -0
- package/__dev__/utilities/extendSchema.js +3 -0
- package/__dev__/utilities/extendSchema.mjs +3 -0
- package/__dev__/utilities/findSchemaChanges.d.mts +1 -0
- package/__dev__/utilities/findSchemaChanges.d.ts +1 -0
- package/__dev__/utilities/findSchemaChanges.js +3 -0
- package/__dev__/utilities/findSchemaChanges.mjs +3 -0
- package/__dev__/utilities/getDefaultValueAST.d.mts +1 -0
- package/__dev__/utilities/getDefaultValueAST.d.ts +1 -0
- package/__dev__/utilities/getDefaultValueAST.js +3 -0
- package/__dev__/utilities/getDefaultValueAST.mjs +3 -0
- package/__dev__/utilities/getIntrospectionQuery.d.mts +1 -0
- package/__dev__/utilities/getIntrospectionQuery.d.ts +1 -0
- package/__dev__/utilities/getIntrospectionQuery.js +3 -0
- package/__dev__/utilities/getIntrospectionQuery.mjs +3 -0
- package/__dev__/utilities/getOperationAST.d.mts +1 -0
- package/__dev__/utilities/getOperationAST.d.ts +1 -0
- package/__dev__/utilities/getOperationAST.js +3 -0
- package/__dev__/utilities/getOperationAST.mjs +3 -0
- package/__dev__/utilities/index.d.mts +1 -0
- package/__dev__/utilities/index.d.ts +1 -0
- package/__dev__/utilities/index.js +3 -0
- package/__dev__/utilities/index.mjs +3 -0
- package/__dev__/utilities/introspectionFromSchema.d.mts +1 -0
- package/__dev__/utilities/introspectionFromSchema.d.ts +1 -0
- package/__dev__/utilities/introspectionFromSchema.js +3 -0
- package/__dev__/utilities/introspectionFromSchema.mjs +3 -0
- package/__dev__/utilities/lexicographicSortSchema.d.mts +1 -0
- package/__dev__/utilities/lexicographicSortSchema.d.ts +1 -0
- package/__dev__/utilities/lexicographicSortSchema.js +3 -0
- package/__dev__/utilities/lexicographicSortSchema.mjs +3 -0
- package/__dev__/utilities/mapSchemaConfig.d.mts +1 -0
- package/__dev__/utilities/mapSchemaConfig.d.ts +1 -0
- package/__dev__/utilities/mapSchemaConfig.js +3 -0
- package/__dev__/utilities/mapSchemaConfig.mjs +3 -0
- package/__dev__/utilities/printSchema.d.mts +1 -0
- package/__dev__/utilities/printSchema.d.ts +1 -0
- package/__dev__/utilities/printSchema.js +3 -0
- package/__dev__/utilities/printSchema.mjs +3 -0
- package/__dev__/utilities/replaceVariables.d.mts +1 -0
- package/__dev__/utilities/replaceVariables.d.ts +1 -0
- package/__dev__/utilities/replaceVariables.js +3 -0
- package/__dev__/utilities/replaceVariables.mjs +3 -0
- package/__dev__/utilities/resolveSchemaCoordinate.d.mts +1 -0
- package/__dev__/utilities/resolveSchemaCoordinate.d.ts +1 -0
- package/__dev__/utilities/resolveSchemaCoordinate.js +3 -0
- package/__dev__/utilities/resolveSchemaCoordinate.mjs +3 -0
- package/__dev__/utilities/separateOperations.d.mts +1 -0
- package/__dev__/utilities/separateOperations.d.ts +1 -0
- package/__dev__/utilities/separateOperations.js +3 -0
- package/__dev__/utilities/separateOperations.mjs +3 -0
- package/__dev__/utilities/sortValueNode.d.mts +1 -0
- package/__dev__/utilities/sortValueNode.d.ts +1 -0
- package/__dev__/utilities/sortValueNode.js +3 -0
- package/__dev__/utilities/sortValueNode.mjs +3 -0
- package/__dev__/utilities/stripIgnoredCharacters.d.mts +1 -0
- package/__dev__/utilities/stripIgnoredCharacters.d.ts +1 -0
- package/__dev__/utilities/stripIgnoredCharacters.js +3 -0
- package/__dev__/utilities/stripIgnoredCharacters.mjs +3 -0
- package/__dev__/utilities/typeComparators.d.mts +1 -0
- package/__dev__/utilities/typeComparators.d.ts +1 -0
- package/__dev__/utilities/typeComparators.js +3 -0
- package/__dev__/utilities/typeComparators.mjs +3 -0
- package/__dev__/utilities/typeFromAST.d.mts +1 -0
- package/__dev__/utilities/typeFromAST.d.ts +1 -0
- package/__dev__/utilities/typeFromAST.js +3 -0
- package/__dev__/utilities/typeFromAST.mjs +3 -0
- package/__dev__/utilities/typedQueryDocumentNode.d.mts +1 -0
- package/__dev__/utilities/typedQueryDocumentNode.d.ts +1 -0
- package/__dev__/utilities/typedQueryDocumentNode.js +3 -0
- package/__dev__/utilities/typedQueryDocumentNode.mjs +3 -0
- package/__dev__/utilities/validateInputValue.d.mts +1 -0
- package/__dev__/utilities/validateInputValue.d.ts +1 -0
- package/__dev__/utilities/validateInputValue.js +3 -0
- package/__dev__/utilities/validateInputValue.mjs +3 -0
- package/__dev__/utilities/valueFromAST.d.mts +1 -0
- package/__dev__/utilities/valueFromAST.d.ts +1 -0
- package/__dev__/utilities/valueFromAST.js +3 -0
- package/__dev__/utilities/valueFromAST.mjs +3 -0
- package/__dev__/utilities/valueFromASTUntyped.d.mts +1 -0
- package/__dev__/utilities/valueFromASTUntyped.d.ts +1 -0
- package/__dev__/utilities/valueFromASTUntyped.js +3 -0
- package/__dev__/utilities/valueFromASTUntyped.mjs +3 -0
- package/__dev__/utilities/valueToLiteral.d.mts +1 -0
- package/__dev__/utilities/valueToLiteral.d.ts +1 -0
- package/__dev__/utilities/valueToLiteral.js +3 -0
- package/__dev__/utilities/valueToLiteral.mjs +3 -0
- package/__dev__/validation/ValidationContext.d.mts +1 -0
- package/__dev__/validation/ValidationContext.d.ts +1 -0
- package/__dev__/validation/ValidationContext.js +3 -0
- package/__dev__/validation/ValidationContext.mjs +3 -0
- package/__dev__/validation/index.d.mts +1 -0
- package/__dev__/validation/index.d.ts +1 -0
- package/__dev__/validation/index.js +3 -0
- package/__dev__/validation/index.mjs +3 -0
- package/__dev__/validation/rules/DeferStreamDirectiveLabelRule.d.mts +1 -0
- package/__dev__/validation/rules/DeferStreamDirectiveLabelRule.d.ts +1 -0
- package/__dev__/validation/rules/DeferStreamDirectiveLabelRule.js +3 -0
- package/__dev__/validation/rules/DeferStreamDirectiveLabelRule.mjs +3 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnRootFieldRule.d.mts +1 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnRootFieldRule.d.ts +1 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnRootFieldRule.js +3 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnRootFieldRule.mjs +3 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnValidOperationsRule.d.mts +1 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnValidOperationsRule.d.ts +1 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnValidOperationsRule.js +3 -0
- package/__dev__/validation/rules/DeferStreamDirectiveOnValidOperationsRule.mjs +3 -0
- package/__dev__/validation/rules/ExecutableDefinitionsRule.d.mts +1 -0
- package/__dev__/validation/rules/ExecutableDefinitionsRule.d.ts +1 -0
- package/__dev__/validation/rules/ExecutableDefinitionsRule.js +3 -0
- package/__dev__/validation/rules/ExecutableDefinitionsRule.mjs +3 -0
- package/__dev__/validation/rules/FieldsOnCorrectTypeRule.d.mts +1 -0
- package/__dev__/validation/rules/FieldsOnCorrectTypeRule.d.ts +1 -0
- package/__dev__/validation/rules/FieldsOnCorrectTypeRule.js +3 -0
- package/__dev__/validation/rules/FieldsOnCorrectTypeRule.mjs +3 -0
- package/__dev__/validation/rules/FragmentsOnCompositeTypesRule.d.mts +1 -0
- package/__dev__/validation/rules/FragmentsOnCompositeTypesRule.d.ts +1 -0
- package/__dev__/validation/rules/FragmentsOnCompositeTypesRule.js +3 -0
- package/__dev__/validation/rules/FragmentsOnCompositeTypesRule.mjs +3 -0
- package/__dev__/validation/rules/KnownArgumentNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/KnownArgumentNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/KnownArgumentNamesRule.js +3 -0
- package/__dev__/validation/rules/KnownArgumentNamesRule.mjs +3 -0
- package/__dev__/validation/rules/KnownDirectivesRule.d.mts +1 -0
- package/__dev__/validation/rules/KnownDirectivesRule.d.ts +1 -0
- package/__dev__/validation/rules/KnownDirectivesRule.js +3 -0
- package/__dev__/validation/rules/KnownDirectivesRule.mjs +3 -0
- package/__dev__/validation/rules/KnownFragmentNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/KnownFragmentNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/KnownFragmentNamesRule.js +3 -0
- package/__dev__/validation/rules/KnownFragmentNamesRule.mjs +3 -0
- package/__dev__/validation/rules/KnownOperationTypesRule.d.mts +1 -0
- package/__dev__/validation/rules/KnownOperationTypesRule.d.ts +1 -0
- package/__dev__/validation/rules/KnownOperationTypesRule.js +3 -0
- package/__dev__/validation/rules/KnownOperationTypesRule.mjs +3 -0
- package/__dev__/validation/rules/KnownTypeNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/KnownTypeNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/KnownTypeNamesRule.js +3 -0
- package/__dev__/validation/rules/KnownTypeNamesRule.mjs +3 -0
- package/__dev__/validation/rules/LoneAnonymousOperationRule.d.mts +1 -0
- package/__dev__/validation/rules/LoneAnonymousOperationRule.d.ts +1 -0
- package/__dev__/validation/rules/LoneAnonymousOperationRule.js +3 -0
- package/__dev__/validation/rules/LoneAnonymousOperationRule.mjs +3 -0
- package/__dev__/validation/rules/LoneSchemaDefinitionRule.d.mts +1 -0
- package/__dev__/validation/rules/LoneSchemaDefinitionRule.d.ts +1 -0
- package/__dev__/validation/rules/LoneSchemaDefinitionRule.js +3 -0
- package/__dev__/validation/rules/LoneSchemaDefinitionRule.mjs +3 -0
- package/__dev__/validation/rules/MaxIntrospectionDepthRule.d.mts +1 -0
- package/__dev__/validation/rules/MaxIntrospectionDepthRule.d.ts +1 -0
- package/__dev__/validation/rules/MaxIntrospectionDepthRule.js +3 -0
- package/__dev__/validation/rules/MaxIntrospectionDepthRule.mjs +3 -0
- package/__dev__/validation/rules/NoFragmentCyclesRule.d.mts +1 -0
- package/__dev__/validation/rules/NoFragmentCyclesRule.d.ts +1 -0
- package/__dev__/validation/rules/NoFragmentCyclesRule.js +3 -0
- package/__dev__/validation/rules/NoFragmentCyclesRule.mjs +3 -0
- package/__dev__/validation/rules/NoUndefinedVariablesRule.d.mts +1 -0
- package/__dev__/validation/rules/NoUndefinedVariablesRule.d.ts +1 -0
- package/__dev__/validation/rules/NoUndefinedVariablesRule.js +3 -0
- package/__dev__/validation/rules/NoUndefinedVariablesRule.mjs +3 -0
- package/__dev__/validation/rules/NoUnusedFragmentsRule.d.mts +1 -0
- package/__dev__/validation/rules/NoUnusedFragmentsRule.d.ts +1 -0
- package/__dev__/validation/rules/NoUnusedFragmentsRule.js +3 -0
- package/__dev__/validation/rules/NoUnusedFragmentsRule.mjs +3 -0
- package/__dev__/validation/rules/NoUnusedVariablesRule.d.mts +1 -0
- package/__dev__/validation/rules/NoUnusedVariablesRule.d.ts +1 -0
- package/__dev__/validation/rules/NoUnusedVariablesRule.js +3 -0
- package/__dev__/validation/rules/NoUnusedVariablesRule.mjs +3 -0
- package/__dev__/validation/rules/OverlappingFieldsCanBeMergedRule.d.mts +1 -0
- package/__dev__/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +1 -0
- package/__dev__/validation/rules/OverlappingFieldsCanBeMergedRule.js +3 -0
- package/__dev__/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +3 -0
- package/__dev__/validation/rules/PossibleFragmentSpreadsRule.d.mts +1 -0
- package/__dev__/validation/rules/PossibleFragmentSpreadsRule.d.ts +1 -0
- package/__dev__/validation/rules/PossibleFragmentSpreadsRule.js +3 -0
- package/__dev__/validation/rules/PossibleFragmentSpreadsRule.mjs +3 -0
- package/__dev__/validation/rules/PossibleTypeExtensionsRule.d.mts +1 -0
- package/__dev__/validation/rules/PossibleTypeExtensionsRule.d.ts +1 -0
- package/__dev__/validation/rules/PossibleTypeExtensionsRule.js +3 -0
- package/__dev__/validation/rules/PossibleTypeExtensionsRule.mjs +3 -0
- package/__dev__/validation/rules/ProvidedRequiredArgumentsRule.d.mts +1 -0
- package/__dev__/validation/rules/ProvidedRequiredArgumentsRule.d.ts +1 -0
- package/__dev__/validation/rules/ProvidedRequiredArgumentsRule.js +3 -0
- package/__dev__/validation/rules/ProvidedRequiredArgumentsRule.mjs +3 -0
- package/__dev__/validation/rules/ScalarLeafsRule.d.mts +1 -0
- package/__dev__/validation/rules/ScalarLeafsRule.d.ts +1 -0
- package/__dev__/validation/rules/ScalarLeafsRule.js +3 -0
- package/__dev__/validation/rules/ScalarLeafsRule.mjs +3 -0
- package/__dev__/validation/rules/SingleFieldSubscriptionsRule.d.mts +1 -0
- package/__dev__/validation/rules/SingleFieldSubscriptionsRule.d.ts +1 -0
- package/__dev__/validation/rules/SingleFieldSubscriptionsRule.js +3 -0
- package/__dev__/validation/rules/SingleFieldSubscriptionsRule.mjs +3 -0
- package/__dev__/validation/rules/StreamDirectiveOnListFieldRule.d.mts +1 -0
- package/__dev__/validation/rules/StreamDirectiveOnListFieldRule.d.ts +1 -0
- package/__dev__/validation/rules/StreamDirectiveOnListFieldRule.js +3 -0
- package/__dev__/validation/rules/StreamDirectiveOnListFieldRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueArgumentDefinitionNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueArgumentDefinitionNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueArgumentDefinitionNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueArgumentNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueArgumentNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueArgumentNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueArgumentNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueDirectiveNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueDirectiveNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueDirectiveNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueDirectiveNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueDirectivesPerLocationRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueDirectivesPerLocationRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueDirectivesPerLocationRule.js +3 -0
- package/__dev__/validation/rules/UniqueDirectivesPerLocationRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueEnumValueNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueEnumValueNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueEnumValueNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueEnumValueNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueFieldDefinitionNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueFieldDefinitionNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueFieldDefinitionNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueFieldDefinitionNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueFragmentNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueFragmentNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueFragmentNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueFragmentNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueInputFieldNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueInputFieldNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueInputFieldNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueInputFieldNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueOperationNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueOperationNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueOperationNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueOperationNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueOperationTypesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueOperationTypesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueOperationTypesRule.js +3 -0
- package/__dev__/validation/rules/UniqueOperationTypesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueTypeNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueTypeNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueTypeNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueTypeNamesRule.mjs +3 -0
- package/__dev__/validation/rules/UniqueVariableNamesRule.d.mts +1 -0
- package/__dev__/validation/rules/UniqueVariableNamesRule.d.ts +1 -0
- package/__dev__/validation/rules/UniqueVariableNamesRule.js +3 -0
- package/__dev__/validation/rules/UniqueVariableNamesRule.mjs +3 -0
- package/__dev__/validation/rules/ValuesOfCorrectTypeRule.d.mts +1 -0
- package/__dev__/validation/rules/ValuesOfCorrectTypeRule.d.ts +1 -0
- package/__dev__/validation/rules/ValuesOfCorrectTypeRule.js +3 -0
- package/__dev__/validation/rules/ValuesOfCorrectTypeRule.mjs +3 -0
- package/__dev__/validation/rules/VariablesAreInputTypesRule.d.mts +1 -0
- package/__dev__/validation/rules/VariablesAreInputTypesRule.d.ts +1 -0
- package/__dev__/validation/rules/VariablesAreInputTypesRule.js +3 -0
- package/__dev__/validation/rules/VariablesAreInputTypesRule.mjs +3 -0
- package/__dev__/validation/rules/VariablesInAllowedPositionRule.d.mts +1 -0
- package/__dev__/validation/rules/VariablesInAllowedPositionRule.d.ts +1 -0
- package/__dev__/validation/rules/VariablesInAllowedPositionRule.js +3 -0
- package/__dev__/validation/rules/VariablesInAllowedPositionRule.mjs +3 -0
- package/__dev__/validation/rules/custom/NoDeprecatedCustomRule.d.mts +1 -0
- package/__dev__/validation/rules/custom/NoDeprecatedCustomRule.d.ts +1 -0
- package/__dev__/validation/rules/custom/NoDeprecatedCustomRule.js +3 -0
- package/__dev__/validation/rules/custom/NoDeprecatedCustomRule.mjs +3 -0
- package/__dev__/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.mts +1 -0
- package/__dev__/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +1 -0
- package/__dev__/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +3 -0
- package/__dev__/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +3 -0
- package/__dev__/validation/specifiedRules.d.mts +1 -0
- package/__dev__/validation/specifiedRules.d.ts +1 -0
- package/__dev__/validation/specifiedRules.js +3 -0
- package/__dev__/validation/specifiedRules.mjs +3 -0
- package/__dev__/validation/validate.d.mts +1 -0
- package/__dev__/validation/validate.d.ts +1 -0
- package/__dev__/validation/validate.js +3 -0
- package/__dev__/validation/validate.mjs +3 -0
- package/__dev__/version.d.mts +1 -0
- package/__dev__/version.d.ts +1 -0
- package/__dev__/version.js +3 -0
- package/__dev__/version.mjs +3 -0
- package/devMode.d.mts +2 -0
- package/devMode.d.ts +2 -0
- package/devMode.js +14 -0
- package/devMode.js.map +1 -0
- package/devMode.mjs +10 -0
- package/devMode.mjs.map +1 -0
- package/error/GraphQLError.d.mts +120 -0
- package/error/ensureGraphQLError.d.mts +5 -0
- package/error/ensureGraphQLError.d.ts +5 -0
- package/error/ensureGraphQLError.js +16 -0
- package/error/ensureGraphQLError.js.map +1 -0
- package/error/ensureGraphQLError.mjs +13 -0
- package/error/ensureGraphQLError.mjs.map +1 -0
- package/error/index.d.mts +4 -0
- package/error/locatedError.d.mts +9 -0
- package/error/syntaxError.d.mts +7 -0
- package/execution/AbortedGraphQLExecutionError.d.mts +6 -0
- package/execution/AbortedGraphQLExecutionError.d.ts +6 -0
- package/execution/AbortedGraphQLExecutionError.js +27 -0
- package/execution/AbortedGraphQLExecutionError.js.map +1 -0
- package/execution/AbortedGraphQLExecutionError.mjs +23 -0
- package/execution/AbortedGraphQLExecutionError.mjs.map +1 -0
- package/execution/AsyncWorkTracker.d.mts +10 -0
- package/execution/AsyncWorkTracker.d.ts +10 -0
- package/execution/AsyncWorkTracker.js +49 -0
- package/execution/AsyncWorkTracker.js.map +1 -0
- package/execution/AsyncWorkTracker.mjs +45 -0
- package/execution/AsyncWorkTracker.mjs.map +1 -0
- package/execution/Executor.d.mts +212 -0
- package/execution/Executor.d.ts +212 -0
- package/execution/Executor.js +655 -0
- package/execution/Executor.js.map +1 -0
- package/execution/Executor.mjs +651 -0
- package/execution/Executor.mjs.map +1 -0
- package/execution/ExecutorThrowingOnIncremental.d.mts +12 -0
- package/execution/ExecutorThrowingOnIncremental.d.ts +12 -0
- package/execution/ExecutorThrowingOnIncremental.js +47 -0
- package/execution/ExecutorThrowingOnIncremental.js.map +1 -0
- package/execution/ExecutorThrowingOnIncremental.mjs +43 -0
- package/execution/ExecutorThrowingOnIncremental.mjs.map +1 -0
- package/execution/cancellablePromise.d.mts +6 -0
- package/execution/cancellablePromise.d.ts +6 -0
- package/execution/cancellablePromise.js +49 -0
- package/execution/cancellablePromise.js.map +1 -0
- package/execution/cancellablePromise.mjs +45 -0
- package/execution/cancellablePromise.mjs.map +1 -0
- package/execution/collectFields.d.mts +59 -0
- package/execution/collectFields.d.ts +15 -4
- package/execution/collectFields.js +57 -22
- package/execution/collectFields.js.map +1 -1
- package/execution/collectFields.mjs +58 -23
- package/execution/collectFields.mjs.map +1 -1
- package/execution/collectIteratorPromises.d.mts +5 -0
- package/execution/collectIteratorPromises.d.ts +5 -0
- package/execution/collectIteratorPromises.js +27 -0
- package/execution/collectIteratorPromises.js.map +1 -0
- package/execution/collectIteratorPromises.mjs +24 -0
- package/execution/collectIteratorPromises.mjs.map +1 -0
- package/execution/createSharedExecutionContext.d.mts +10 -0
- package/execution/createSharedExecutionContext.d.ts +10 -0
- package/execution/createSharedExecutionContext.js +20 -0
- package/execution/createSharedExecutionContext.js.map +1 -0
- package/execution/createSharedExecutionContext.mjs +17 -0
- package/execution/createSharedExecutionContext.mjs.map +1 -0
- package/execution/execute.d.mts +180 -0
- package/execution/execute.d.ts +73 -118
- package/execution/execute.js +218 -1121
- package/execution/execute.js.map +1 -1
- package/execution/execute.mjs +213 -1119
- package/execution/execute.mjs.map +1 -1
- package/execution/getStreamUsage.d.mts +13 -0
- package/execution/getStreamUsage.d.ts +13 -0
- package/execution/getStreamUsage.js +41 -0
- package/execution/getStreamUsage.js.map +1 -0
- package/execution/getStreamUsage.mjs +38 -0
- package/execution/getStreamUsage.mjs.map +1 -0
- package/execution/getVariableSignature.d.mts +18 -0
- package/execution/hooks.d.mts +9 -0
- package/execution/hooks.d.ts +9 -0
- package/execution/hooks.js +24 -0
- package/execution/hooks.js.map +1 -0
- package/execution/hooks.mjs +21 -0
- package/execution/hooks.mjs.map +1 -0
- package/execution/incremental/Computation.d.mts +22 -0
- package/execution/incremental/Computation.d.ts +22 -0
- package/execution/incremental/Computation.js +68 -0
- package/execution/incremental/Computation.js.map +1 -0
- package/execution/incremental/Computation.mjs +64 -0
- package/execution/incremental/Computation.mjs.map +1 -0
- package/execution/incremental/IncrementalExecutor.d.mts +182 -0
- package/execution/incremental/IncrementalExecutor.d.ts +182 -0
- package/execution/incremental/IncrementalExecutor.js +390 -0
- package/execution/incremental/IncrementalExecutor.js.map +1 -0
- package/execution/incremental/IncrementalExecutor.mjs +386 -0
- package/execution/incremental/IncrementalExecutor.mjs.map +1 -0
- package/execution/incremental/IncrementalPublisher.d.mts +17 -0
- package/execution/incremental/IncrementalPublisher.d.ts +17 -0
- package/execution/incremental/IncrementalPublisher.js +201 -0
- package/execution/incremental/IncrementalPublisher.js.map +1 -0
- package/execution/incremental/IncrementalPublisher.mjs +197 -0
- package/execution/incremental/IncrementalPublisher.mjs.map +1 -0
- package/execution/incremental/Queue.d.mts +86 -0
- package/execution/incremental/Queue.d.ts +86 -0
- package/execution/incremental/Queue.js +330 -0
- package/execution/incremental/Queue.js.map +1 -0
- package/execution/incremental/Queue.mjs +325 -0
- package/execution/incremental/Queue.mjs.map +1 -0
- package/execution/incremental/WorkQueue.d.mts +67 -0
- package/execution/incremental/WorkQueue.d.ts +67 -0
- package/execution/incremental/WorkQueue.js +396 -0
- package/execution/incremental/WorkQueue.js.map +1 -0
- package/execution/incremental/WorkQueue.mjs +393 -0
- package/execution/incremental/WorkQueue.mjs.map +1 -0
- package/execution/incremental/buildExecutionPlan.d.mts +7 -0
- package/execution/{buildExecutionPlan.d.ts → incremental/buildExecutionPlan.d.ts} +1 -1
- package/execution/{buildExecutionPlan.js → incremental/buildExecutionPlan.js} +2 -2
- package/execution/incremental/buildExecutionPlan.js.map +1 -0
- package/execution/{buildExecutionPlan.mjs → incremental/buildExecutionPlan.mjs} +2 -2
- package/execution/incremental/buildExecutionPlan.mjs.map +1 -0
- package/execution/index.d.mts +8 -0
- package/execution/index.d.ts +6 -3
- package/execution/index.js +8 -4
- package/execution/index.js.map +1 -1
- package/execution/index.mjs +2 -1
- package/execution/index.mjs.map +1 -1
- package/execution/mapAsyncIterable.d.mts +6 -0
- package/execution/mapAsyncIterable.d.ts +1 -1
- package/execution/mapAsyncIterable.js +28 -51
- package/execution/mapAsyncIterable.js.map +1 -1
- package/execution/mapAsyncIterable.mjs +28 -51
- package/execution/mapAsyncIterable.mjs.map +1 -1
- package/execution/returnIteratorCatchingErrors.d.mts +1 -0
- package/execution/returnIteratorCatchingErrors.d.ts +1 -0
- package/execution/returnIteratorCatchingErrors.js +12 -0
- package/execution/returnIteratorCatchingErrors.js.map +1 -0
- package/execution/returnIteratorCatchingErrors.mjs +9 -0
- package/execution/returnIteratorCatchingErrors.mjs.map +1 -0
- package/execution/values.d.mts +61 -0
- package/execution/values.d.ts +12 -21
- package/execution/values.js +111 -74
- package/execution/values.js.map +1 -1
- package/execution/values.mjs +111 -73
- package/execution/values.mjs.map +1 -1
- package/execution/withConcurrentAbruptClose.d.mts +13 -0
- package/execution/withConcurrentAbruptClose.d.ts +13 -0
- package/execution/withConcurrentAbruptClose.js +72 -0
- package/execution/withConcurrentAbruptClose.js.map +1 -0
- package/execution/withConcurrentAbruptClose.mjs +69 -0
- package/execution/withConcurrentAbruptClose.mjs.map +1 -0
- package/graphql.d.mts +61 -0
- package/graphql.d.ts +9 -16
- package/graphql.js +22 -22
- package/graphql.js.map +1 -1
- package/graphql.mjs +22 -22
- package/graphql.mjs.map +1 -1
- package/harness.d.mts +15 -0
- package/harness.d.ts +15 -0
- package/harness.js +13 -0
- package/harness.js.map +1 -0
- package/harness.mjs +10 -0
- package/harness.mjs.map +1 -0
- package/index.d.mts +51 -0
- package/index.d.ts +10 -7
- package/index.js +25 -8
- package/index.js.map +1 -1
- package/index.mjs +11 -5
- package/index.mjs.map +1 -1
- package/jsutils/AccumulatorMap.d.mts +7 -0
- package/jsutils/AccumulatorMap.js +1 -0
- package/jsutils/AccumulatorMap.js.map +1 -1
- package/jsutils/AccumulatorMap.mjs +1 -0
- package/jsutils/AccumulatorMap.mjs.map +1 -1
- package/jsutils/Maybe.d.mts +2 -0
- package/jsutils/ObjMap.d.mts +18 -0
- package/jsutils/Path.d.mts +14 -0
- package/jsutils/PromiseOrValue.d.mts +1 -0
- package/jsutils/capitalize.d.mts +4 -0
- package/jsutils/devAssert.d.mts +1 -0
- package/jsutils/didYouMean.d.mts +5 -0
- package/jsutils/formatList.d.mts +8 -0
- package/jsutils/formatList.js +2 -1
- package/jsutils/formatList.js.map +1 -1
- package/jsutils/formatList.mjs +2 -1
- package/jsutils/formatList.mjs.map +1 -1
- package/jsutils/getBySet.d.mts +1 -0
- package/jsutils/groupBy.d.mts +4 -0
- package/jsutils/identityFunc.d.mts +4 -0
- package/jsutils/inspect.d.mts +4 -0
- package/jsutils/instanceOf.d.mts +15 -0
- package/jsutils/instanceOf.d.ts +8 -7
- package/jsutils/instanceOf.js +29 -30
- package/jsutils/instanceOf.js.map +1 -1
- package/jsutils/instanceOf.mjs +28 -30
- package/jsutils/instanceOf.mjs.map +1 -1
- package/jsutils/invariant.d.mts +1 -0
- package/jsutils/isAsyncIterable.d.mts +5 -0
- package/jsutils/isIterableObject.d.mts +18 -0
- package/jsutils/isObjectLike.d.mts +7 -0
- package/jsutils/isPromise.d.mts +6 -0
- package/jsutils/isPromise.d.ts +2 -1
- package/jsutils/isPromise.js +5 -1
- package/jsutils/isPromise.js.map +1 -1
- package/jsutils/isPromise.mjs +4 -1
- package/jsutils/isPromise.mjs.map +1 -1
- package/jsutils/isSameSet.d.mts +1 -0
- package/jsutils/keyMap.d.mts +29 -0
- package/jsutils/keyValMap.d.mts +19 -0
- package/jsutils/mapValue.d.mts +6 -0
- package/jsutils/memoize1.d.mts +4 -0
- package/jsutils/memoize1.d.ts +4 -0
- package/jsutils/memoize1.js +19 -0
- package/jsutils/memoize1.js.map +1 -0
- package/jsutils/memoize1.mjs +16 -0
- package/jsutils/memoize1.mjs.map +1 -0
- package/jsutils/memoize2.d.mts +4 -0
- package/jsutils/memoize2.d.ts +4 -0
- package/jsutils/memoize2.js +24 -0
- package/jsutils/memoize2.js.map +1 -0
- package/jsutils/memoize2.mjs +21 -0
- package/jsutils/memoize2.mjs.map +1 -0
- package/jsutils/memoize3.d.mts +4 -0
- package/jsutils/memoize3.js +1 -3
- package/jsutils/memoize3.js.map +1 -1
- package/jsutils/memoize3.mjs +1 -3
- package/jsutils/memoize3.mjs.map +1 -1
- package/jsutils/naturalCompare.d.mts +8 -0
- package/jsutils/printPathArray.d.mts +4 -0
- package/jsutils/promiseForObject.d.mts +10 -0
- package/jsutils/promiseForObject.d.ts +2 -1
- package/jsutils/promiseForObject.js +8 -7
- package/jsutils/promiseForObject.js.map +1 -1
- package/jsutils/promiseForObject.mjs +8 -7
- package/jsutils/promiseForObject.mjs.map +1 -1
- package/jsutils/promiseReduce.d.mts +9 -0
- package/jsutils/promiseWithResolvers.d.mts +10 -0
- package/jsutils/suggestionList.d.mts +5 -0
- package/jsutils/toError.d.mts +4 -0
- package/jsutils/toObjMap.d.mts +4 -0
- package/language/KindTypeMap.d.mts +2 -0
- package/language/KindTypeMap.d.ts +2 -0
- package/language/KindTypeMap.js +3 -0
- package/language/KindTypeMap.js.map +1 -0
- package/language/KindTypeMap.mjs +2 -0
- package/language/KindTypeMap.mjs.map +1 -0
- package/language/ast.d.mts +495 -0
- package/language/ast.d.ts +94 -51
- package/language/ast.js +15 -2
- package/language/ast.js.map +1 -1
- package/language/ast.mjs +15 -2
- package/language/ast.mjs.map +1 -1
- package/language/blockString.d.mts +23 -0
- package/language/characterClasses.d.mts +47 -0
- package/language/directiveLocation.d.mts +28 -0
- package/language/index.d.mts +16 -0
- package/language/index.d.ts +3 -3
- package/language/index.js +7 -2
- package/language/index.js.map +1 -1
- package/language/index.mjs +5 -3
- package/language/index.mjs.map +1 -1
- package/language/kinds.d.mts +3 -0
- package/language/kinds.js +34 -1
- package/language/kinds.js.map +1 -1
- package/language/kinds_.d.mts +109 -0
- package/language/kinds_.d.ts +11 -0
- package/language/kinds_.js +7 -1
- package/language/kinds_.js.map +1 -1
- package/language/kinds_.mjs +6 -0
- package/language/kinds_.mjs.map +1 -1
- package/language/lexer.d.mts +87 -0
- package/language/lexer.d.ts +43 -1
- package/language/lexer.js +10 -0
- package/language/lexer.js.map +1 -1
- package/language/lexer.mjs +10 -3
- package/language/lexer.mjs.map +1 -1
- package/language/location.d.mts +13 -0
- package/language/location.js +2 -1
- package/language/location.js.map +1 -1
- package/language/location.mjs +2 -1
- package/language/location.mjs.map +1 -1
- package/language/parser.d.mts +522 -0
- package/language/parser.d.ts +28 -4
- package/language/parser.js +101 -6
- package/language/parser.js.map +1 -1
- package/language/parser.mjs +100 -6
- package/language/parser.mjs.map +1 -1
- package/language/predicates.d.mts +19 -0
- package/language/predicates.d.ts +9 -1
- package/language/predicates.js +19 -0
- package/language/predicates.js.map +1 -1
- package/language/predicates.mjs +17 -0
- package/language/predicates.mjs.map +1 -1
- package/language/printLocation.d.mts +11 -0
- package/language/printString.d.mts +5 -0
- package/language/printer.d.mts +6 -0
- package/language/printer.js +28 -12
- package/language/printer.js.map +1 -1
- package/language/printer.mjs +28 -12
- package/language/printer.mjs.map +1 -1
- package/language/schemaCoordinateLexer.d.mts +43 -0
- package/language/schemaCoordinateLexer.d.ts +43 -0
- package/language/schemaCoordinateLexer.js +93 -0
- package/language/schemaCoordinateLexer.js.map +1 -0
- package/language/schemaCoordinateLexer.mjs +89 -0
- package/language/schemaCoordinateLexer.mjs.map +1 -0
- package/language/source.d.mts +26 -0
- package/language/source.d.ts +1 -0
- package/language/source.js +7 -3
- package/language/source.js.map +1 -1
- package/language/source.mjs +7 -3
- package/language/source.mjs.map +1 -1
- package/language/tokenKind.d.mts +30 -0
- package/language/tokenKind.d.ts +1 -0
- package/language/tokenKind.js +1 -0
- package/language/tokenKind.js.map +1 -1
- package/language/tokenKind.mjs +1 -0
- package/language/tokenKind.mjs.map +1 -1
- package/language/visitor.d.mts +160 -0
- package/language/visitor.js +3 -2
- package/language/visitor.js.map +1 -1
- package/language/visitor.mjs +3 -2
- package/language/visitor.mjs.map +1 -1
- package/package.json +174 -7
- package/type/assertName.d.mts +10 -0
- package/type/definition.d.mts +933 -0
- package/type/definition.d.ts +58 -16
- package/type/definition.js +53 -28
- package/type/definition.js.map +1 -1
- package/type/definition.mjs +53 -28
- package/type/definition.mjs.map +1 -1
- package/type/directives.d.mts +97 -0
- package/type/directives.d.ts +5 -0
- package/type/directives.js +20 -4
- package/type/directives.js.map +1 -1
- package/type/directives.mjs +19 -3
- package/type/directives.mjs.map +1 -1
- package/type/index.d.mts +12 -0
- package/type/index.d.ts +1 -1
- package/type/index.js.map +1 -1
- package/type/index.mjs.map +1 -1
- package/type/introspection.d.mts +26 -0
- package/type/introspection.d.ts +3 -3
- package/type/introspection.js +9 -7
- package/type/introspection.js.map +1 -1
- package/type/introspection.mjs +9 -7
- package/type/introspection.mjs.map +1 -1
- package/type/scalars.d.mts +19 -0
- package/type/scalars.d.ts +5 -5
- package/type/scalars.js +130 -38
- package/type/scalars.js.map +1 -1
- package/type/scalars.mjs +130 -38
- package/type/scalars.mjs.map +1 -1
- package/type/schema.d.mts +172 -0
- package/type/schema.d.ts +2 -0
- package/type/schema.js +11 -13
- package/type/schema.js.map +1 -1
- package/type/schema.mjs +11 -13
- package/type/schema.mjs.map +1 -1
- package/type/validate.d.mts +21 -0
- package/type/validate.d.ts +6 -0
- package/type/validate.js +48 -30
- package/type/validate.js.map +1 -1
- package/type/validate.mjs +47 -30
- package/type/validate.mjs.map +1 -1
- package/utilities/TypeInfo.d.mts +55 -0
- package/utilities/TypeInfo.js +3 -1
- package/utilities/TypeInfo.js.map +1 -1
- package/utilities/TypeInfo.mjs +3 -1
- package/utilities/TypeInfo.mjs.map +1 -1
- package/utilities/astFromValue.d.mts +27 -0
- package/utilities/astFromValue.d.ts +1 -0
- package/utilities/astFromValue.js +8 -2
- package/utilities/astFromValue.js.map +1 -1
- package/utilities/astFromValue.mjs +8 -2
- package/utilities/astFromValue.mjs.map +1 -1
- package/utilities/buildASTSchema.d.mts +29 -0
- package/utilities/buildClientSchema.d.mts +16 -0
- package/utilities/buildClientSchema.js +10 -6
- package/utilities/buildClientSchema.js.map +1 -1
- package/utilities/buildClientSchema.mjs +9 -6
- package/utilities/buildClientSchema.mjs.map +1 -1
- package/utilities/coerceInputValue.d.mts +34 -0
- package/utilities/coerceInputValue.d.ts +7 -1
- package/utilities/coerceInputValue.js +36 -13
- package/utilities/coerceInputValue.js.map +1 -1
- package/utilities/coerceInputValue.mjs +36 -13
- package/utilities/coerceInputValue.mjs.map +1 -1
- package/utilities/concatAST.d.mts +7 -0
- package/utilities/extendSchema.d.mts +29 -0
- package/utilities/extendSchema.js +2 -1
- package/utilities/extendSchema.js.map +1 -1
- package/utilities/extendSchema.mjs +2 -1
- package/utilities/extendSchema.mjs.map +1 -1
- package/utilities/findSchemaChanges.d.mts +72 -0
- package/utilities/findSchemaChanges.d.ts +18 -18
- package/utilities/findSchemaChanges.js +4 -2
- package/utilities/findSchemaChanges.js.map +1 -1
- package/utilities/findSchemaChanges.mjs +4 -2
- package/utilities/findSchemaChanges.mjs.map +1 -1
- package/utilities/getDefaultValueAST.d.mts +3 -0
- package/utilities/getDefaultValueAST.js +4 -2
- package/utilities/getDefaultValueAST.js.map +1 -1
- package/utilities/getDefaultValueAST.mjs +4 -2
- package/utilities/getDefaultValueAST.mjs.map +1 -1
- package/utilities/getIntrospectionQuery.d.mts +138 -0
- package/utilities/getOperationAST.d.mts +8 -0
- package/utilities/index.d.mts +32 -0
- package/utilities/index.d.ts +2 -0
- package/utilities/index.js +5 -1
- package/utilities/index.js.map +1 -1
- package/utilities/index.mjs +2 -0
- package/utilities/index.mjs.map +1 -1
- package/utilities/introspectionFromSchema.d.mts +12 -0
- package/utilities/introspectionFromSchema.js +2 -1
- package/utilities/introspectionFromSchema.js.map +1 -1
- package/utilities/introspectionFromSchema.mjs +2 -1
- package/utilities/introspectionFromSchema.mjs.map +1 -1
- package/utilities/lexicographicSortSchema.d.mts +7 -0
- package/utilities/mapSchemaConfig.d.mts +66 -0
- package/utilities/mapSchemaConfig.d.ts +1 -1
- package/utilities/mapSchemaConfig.js +6 -3
- package/utilities/mapSchemaConfig.js.map +1 -1
- package/utilities/mapSchemaConfig.mjs +6 -3
- package/utilities/mapSchemaConfig.mjs.map +1 -1
- package/utilities/printSchema.d.mts +7 -0
- package/utilities/printSchema.js +4 -2
- package/utilities/printSchema.js.map +1 -1
- package/utilities/printSchema.mjs +4 -2
- package/utilities/printSchema.mjs.map +1 -1
- package/utilities/replaceVariables.d.mts +13 -0
- package/utilities/replaceVariables.d.ts +2 -1
- package/utilities/replaceVariables.js +17 -8
- package/utilities/replaceVariables.js.map +1 -1
- package/utilities/replaceVariables.mjs +17 -8
- package/utilities/replaceVariables.mjs.map +1 -1
- package/utilities/resolveSchemaCoordinate.d.mts +57 -0
- package/utilities/resolveSchemaCoordinate.d.ts +57 -0
- package/utilities/resolveSchemaCoordinate.js +167 -0
- package/utilities/resolveSchemaCoordinate.js.map +1 -0
- package/utilities/resolveSchemaCoordinate.mjs +163 -0
- package/utilities/resolveSchemaCoordinate.mjs.map +1 -0
- package/utilities/separateOperations.d.mts +9 -0
- package/utilities/sortValueNode.d.mts +9 -0
- package/utilities/stripIgnoredCharacters.d.mts +62 -0
- package/utilities/typeComparators.d.mts +21 -0
- package/utilities/typeFromAST.d.mts +15 -0
- package/utilities/typedQueryDocumentNode.d.mts +17 -0
- package/utilities/validateInputValue.d.mts +19 -0
- package/utilities/validateInputValue.d.ts +2 -1
- package/utilities/validateInputValue.js +42 -17
- package/utilities/validateInputValue.js.map +1 -1
- package/utilities/validateInputValue.mjs +42 -17
- package/utilities/validateInputValue.mjs.map +1 -1
- package/utilities/valueFromAST.d.mts +26 -0
- package/utilities/valueFromAST.js +24 -9
- package/utilities/valueFromAST.js.map +1 -1
- package/utilities/valueFromAST.mjs +24 -9
- package/utilities/valueFromAST.mjs.map +1 -1
- package/utilities/valueFromASTUntyped.d.mts +20 -0
- package/utilities/valueToLiteral.d.mts +31 -0
- package/utilities/valueToLiteral.d.ts +1 -0
- package/utilities/valueToLiteral.js +4 -1
- package/utilities/valueToLiteral.js.map +1 -1
- package/utilities/valueToLiteral.mjs +4 -1
- package/utilities/valueToLiteral.mjs.map +1 -1
- package/validation/ValidationContext.d.mts +70 -0
- package/validation/ValidationContext.js +2 -0
- package/validation/ValidationContext.js.map +1 -1
- package/validation/ValidationContext.mjs +2 -0
- package/validation/ValidationContext.mjs.map +1 -1
- package/validation/index.d.mts +46 -0
- package/validation/rules/DeferStreamDirectiveLabelRule.d.mts +8 -0
- package/validation/rules/DeferStreamDirectiveLabelRule.js +1 -1
- package/validation/rules/DeferStreamDirectiveLabelRule.js.map +1 -1
- package/validation/rules/DeferStreamDirectiveLabelRule.mjs +1 -1
- package/validation/rules/DeferStreamDirectiveLabelRule.mjs.map +1 -1
- package/validation/rules/DeferStreamDirectiveOnRootFieldRule.d.mts +8 -0
- package/validation/rules/DeferStreamDirectiveOnValidOperationsRule.d.mts +8 -0
- package/validation/rules/ExecutableDefinitionsRule.d.mts +11 -0
- package/validation/rules/FieldsOnCorrectTypeRule.d.mts +11 -0
- package/validation/rules/FragmentsOnCompositeTypesRule.d.mts +12 -0
- package/validation/rules/KnownArgumentNamesRule.d.mts +16 -0
- package/validation/rules/KnownDirectivesRule.d.mts +11 -0
- package/validation/rules/KnownDirectivesRule.js +7 -4
- package/validation/rules/KnownDirectivesRule.js.map +1 -1
- package/validation/rules/KnownDirectivesRule.mjs +7 -4
- package/validation/rules/KnownDirectivesRule.mjs.map +1 -1
- package/validation/rules/KnownFragmentNamesRule.d.mts +11 -0
- package/validation/rules/KnownOperationTypesRule.d.mts +11 -0
- package/validation/rules/KnownTypeNamesRule.d.mts +11 -0
- package/validation/rules/LoneAnonymousOperationRule.d.mts +11 -0
- package/validation/rules/LoneSchemaDefinitionRule.d.mts +8 -0
- package/validation/rules/MaxIntrospectionDepthRule.d.mts +3 -0
- package/validation/rules/MaxIntrospectionDepthRule.d.ts +2 -2
- package/validation/rules/MaxIntrospectionDepthRule.js +1 -2
- package/validation/rules/MaxIntrospectionDepthRule.js.map +1 -1
- package/validation/rules/MaxIntrospectionDepthRule.mjs +1 -2
- package/validation/rules/MaxIntrospectionDepthRule.mjs.map +1 -1
- package/validation/rules/NoFragmentCyclesRule.d.mts +11 -0
- package/validation/rules/NoUndefinedVariablesRule.d.mts +11 -0
- package/validation/rules/NoUnusedFragmentsRule.d.mts +11 -0
- package/validation/rules/NoUnusedVariablesRule.d.mts +11 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule.d.mts +12 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule.js +15 -14
- package/validation/rules/OverlappingFieldsCanBeMergedRule.js.map +1 -1
- package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +15 -14
- package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs.map +1 -1
- package/validation/rules/PossibleFragmentSpreadsRule.d.mts +10 -0
- package/validation/rules/PossibleTypeExtensionsRule.d.mts +8 -0
- package/validation/rules/PossibleTypeExtensionsRule.js +5 -3
- package/validation/rules/PossibleTypeExtensionsRule.js.map +1 -1
- package/validation/rules/PossibleTypeExtensionsRule.mjs +5 -3
- package/validation/rules/PossibleTypeExtensionsRule.mjs.map +1 -1
- package/validation/rules/ProvidedRequiredArgumentsRule.d.mts +13 -0
- package/validation/rules/ScalarLeafsRule.d.mts +9 -0
- package/validation/rules/SingleFieldSubscriptionsRule.d.mts +12 -0
- package/validation/rules/SingleFieldSubscriptionsRule.d.ts +2 -1
- package/validation/rules/SingleFieldSubscriptionsRule.js +9 -2
- package/validation/rules/SingleFieldSubscriptionsRule.js.map +1 -1
- package/validation/rules/SingleFieldSubscriptionsRule.mjs +9 -2
- package/validation/rules/SingleFieldSubscriptionsRule.mjs.map +1 -1
- package/validation/rules/StreamDirectiveOnListFieldRule.d.mts +8 -0
- package/validation/rules/UniqueArgumentDefinitionNamesRule.d.mts +9 -0
- package/validation/rules/UniqueArgumentNamesRule.d.mts +11 -0
- package/validation/rules/UniqueDirectiveNamesRule.d.mts +8 -0
- package/validation/rules/UniqueDirectivesPerLocationRule.d.mts +11 -0
- package/validation/rules/UniqueEnumValueNamesRule.d.mts +8 -0
- package/validation/rules/UniqueFieldDefinitionNamesRule.d.mts +8 -0
- package/validation/rules/UniqueFragmentNamesRule.d.mts +10 -0
- package/validation/rules/UniqueInputFieldNamesRule.d.mts +11 -0
- package/validation/rules/UniqueInputFieldNamesRule.js +2 -1
- package/validation/rules/UniqueInputFieldNamesRule.js.map +1 -1
- package/validation/rules/UniqueInputFieldNamesRule.mjs +2 -1
- package/validation/rules/UniqueInputFieldNamesRule.mjs.map +1 -1
- package/validation/rules/UniqueOperationNamesRule.d.mts +10 -0
- package/validation/rules/UniqueOperationTypesRule.d.mts +8 -0
- package/validation/rules/UniqueTypeNamesRule.d.mts +8 -0
- package/validation/rules/UniqueVariableNamesRule.d.mts +8 -0
- package/validation/rules/ValuesOfCorrectTypeRule.d.mts +11 -0
- package/validation/rules/ValuesOfCorrectTypeRule.js +5 -0
- package/validation/rules/ValuesOfCorrectTypeRule.js.map +1 -1
- package/validation/rules/ValuesOfCorrectTypeRule.mjs +5 -0
- package/validation/rules/ValuesOfCorrectTypeRule.mjs.map +1 -1
- package/validation/rules/VariablesAreInputTypesRule.d.mts +11 -0
- package/validation/rules/VariablesInAllowedPositionRule.d.mts +10 -0
- package/validation/rules/VariablesInAllowedPositionRule.js +1 -3
- package/validation/rules/VariablesInAllowedPositionRule.js.map +1 -1
- package/validation/rules/VariablesInAllowedPositionRule.mjs +1 -3
- package/validation/rules/VariablesInAllowedPositionRule.mjs.map +1 -1
- package/validation/rules/custom/NoDeprecatedCustomRule.d.mts +13 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.mts +13 -0
- package/validation/specifiedRules.d.mts +17 -0
- package/validation/specifiedRules.d.ts +1 -2
- package/validation/specifiedRules.js +3 -1
- package/validation/specifiedRules.js.map +1 -1
- package/validation/specifiedRules.mjs +3 -1
- package/validation/specifiedRules.mjs.map +1 -1
- package/validation/validate.d.mts +48 -0
- package/validation/validate.d.ts +5 -4
- package/validation/validate.js +10 -5
- package/validation/validate.js.map +1 -1
- package/validation/validate.mjs +10 -5
- package/validation/validate.mjs.map +1 -1
- package/version.d.mts +13 -0
- package/version.js +2 -2
- package/version.js.map +1 -1
- package/version.mjs +2 -2
- package/version.mjs.map +1 -1
- package/execution/AbortSignalListener.d.ts +0 -17
- package/execution/AbortSignalListener.js +0 -71
- package/execution/AbortSignalListener.js.map +0 -1
- package/execution/AbortSignalListener.mjs +0 -65
- package/execution/AbortSignalListener.mjs.map +0 -1
- package/execution/IncrementalGraph.d.ts +0 -29
- package/execution/IncrementalGraph.js +0 -232
- package/execution/IncrementalGraph.js.map +0 -1
- package/execution/IncrementalGraph.mjs +0 -228
- package/execution/IncrementalGraph.mjs.map +0 -1
- package/execution/IncrementalPublisher.d.ts +0 -10
- package/execution/IncrementalPublisher.js +0 -259
- package/execution/IncrementalPublisher.js.map +0 -1
- package/execution/IncrementalPublisher.mjs +0 -256
- package/execution/IncrementalPublisher.mjs.map +0 -1
- package/execution/buildExecutionPlan.js.map +0 -1
- package/execution/buildExecutionPlan.mjs.map +0 -1
- package/execution/types.d.ts +0 -161
- package/execution/types.js +0 -36
- package/execution/types.js.map +0 -1
- package/execution/types.mjs +0 -27
- package/execution/types.mjs.map +0 -1
- package/jsutils/BoxedPromiseOrValue.d.ts +0 -15
- package/jsutils/BoxedPromiseOrValue.js +0 -27
- package/jsutils/BoxedPromiseOrValue.js.map +0 -1
- package/jsutils/BoxedPromiseOrValue.mjs +0 -23
- package/jsutils/BoxedPromiseOrValue.mjs.map +0 -1
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { invariant } from "../jsutils/invariant.mjs";
|
|
2
|
-
import { pathToArray } from "../jsutils/Path.mjs";
|
|
3
|
-
import { IncrementalGraph } from "./IncrementalGraph.mjs";
|
|
4
|
-
import { isCancellableStreamRecord, isCompletedExecutionGroup, isFailedExecutionGroup, } from "./types.mjs";
|
|
5
|
-
export function buildIncrementalResponse(context, result, errors, incrementalDataRecords) {
|
|
6
|
-
const incrementalPublisher = new IncrementalPublisher(context);
|
|
7
|
-
return incrementalPublisher.buildResponse(result, errors, incrementalDataRecords);
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* This class is used to publish incremental results to the client, enabling semi-concurrent
|
|
11
|
-
* execution while preserving result order.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
class IncrementalPublisher {
|
|
16
|
-
constructor(context) {
|
|
17
|
-
this._context = context;
|
|
18
|
-
this._nextId = 0;
|
|
19
|
-
this._incrementalGraph = new IncrementalGraph();
|
|
20
|
-
}
|
|
21
|
-
buildResponse(data, errors, incrementalDataRecords) {
|
|
22
|
-
const newRootNodes = this._incrementalGraph.getNewRootNodes(incrementalDataRecords);
|
|
23
|
-
const pending = this._toPendingResults(newRootNodes);
|
|
24
|
-
const initialResult = errors === undefined
|
|
25
|
-
? { data, pending, hasNext: true }
|
|
26
|
-
: { errors, data, pending, hasNext: true };
|
|
27
|
-
return {
|
|
28
|
-
initialResult,
|
|
29
|
-
subsequentResults: this._subscribe(),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
_toPendingResults(newRootNodes) {
|
|
33
|
-
const pendingResults = [];
|
|
34
|
-
for (const node of newRootNodes) {
|
|
35
|
-
const id = String(this._getNextId());
|
|
36
|
-
node.id = id;
|
|
37
|
-
const pendingResult = {
|
|
38
|
-
id,
|
|
39
|
-
path: pathToArray(node.path),
|
|
40
|
-
};
|
|
41
|
-
if (node.label !== undefined) {
|
|
42
|
-
pendingResult.label = node.label;
|
|
43
|
-
}
|
|
44
|
-
pendingResults.push(pendingResult);
|
|
45
|
-
}
|
|
46
|
-
return pendingResults;
|
|
47
|
-
}
|
|
48
|
-
_getNextId() {
|
|
49
|
-
return String(this._nextId++);
|
|
50
|
-
}
|
|
51
|
-
_subscribe() {
|
|
52
|
-
let isDone = false;
|
|
53
|
-
const _next = async () => {
|
|
54
|
-
if (isDone) {
|
|
55
|
-
this._context.abortSignalListener?.disconnect();
|
|
56
|
-
await this._returnAsyncIteratorsIgnoringErrors();
|
|
57
|
-
return { value: undefined, done: true };
|
|
58
|
-
}
|
|
59
|
-
const context = {
|
|
60
|
-
pending: [],
|
|
61
|
-
incremental: [],
|
|
62
|
-
completed: [],
|
|
63
|
-
};
|
|
64
|
-
let batch = this._incrementalGraph.currentCompletedBatch();
|
|
65
|
-
do {
|
|
66
|
-
for (const completedResult of batch) {
|
|
67
|
-
this._handleCompletedIncrementalData(completedResult, context);
|
|
68
|
-
}
|
|
69
|
-
const { incremental, completed } = context;
|
|
70
|
-
if (incremental.length > 0 || completed.length > 0) {
|
|
71
|
-
const hasNext = this._incrementalGraph.hasNext();
|
|
72
|
-
if (!hasNext) {
|
|
73
|
-
isDone = true;
|
|
74
|
-
}
|
|
75
|
-
const subsequentIncrementalExecutionResult = { hasNext };
|
|
76
|
-
const pending = context.pending;
|
|
77
|
-
if (pending.length > 0) {
|
|
78
|
-
subsequentIncrementalExecutionResult.pending = pending;
|
|
79
|
-
}
|
|
80
|
-
if (incremental.length > 0) {
|
|
81
|
-
subsequentIncrementalExecutionResult.incremental = incremental;
|
|
82
|
-
}
|
|
83
|
-
if (completed.length > 0) {
|
|
84
|
-
subsequentIncrementalExecutionResult.completed = completed;
|
|
85
|
-
}
|
|
86
|
-
return { value: subsequentIncrementalExecutionResult, done: false };
|
|
87
|
-
}
|
|
88
|
-
// eslint-disable-next-line no-await-in-loop
|
|
89
|
-
batch = await this._incrementalGraph.nextCompletedBatch();
|
|
90
|
-
} while (batch !== undefined);
|
|
91
|
-
// TODO: add test for this case
|
|
92
|
-
/* c8 ignore next */
|
|
93
|
-
this._context.abortSignalListener?.disconnect();
|
|
94
|
-
await this._returnAsyncIteratorsIgnoringErrors();
|
|
95
|
-
return { value: undefined, done: true };
|
|
96
|
-
};
|
|
97
|
-
const _return = async () => {
|
|
98
|
-
isDone = true;
|
|
99
|
-
this._incrementalGraph.abort();
|
|
100
|
-
await this._returnAsyncIterators();
|
|
101
|
-
return { value: undefined, done: true };
|
|
102
|
-
};
|
|
103
|
-
const _throw = async (error) => {
|
|
104
|
-
isDone = true;
|
|
105
|
-
this._incrementalGraph.abort();
|
|
106
|
-
await this._returnAsyncIterators();
|
|
107
|
-
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
|
|
108
|
-
return Promise.reject(error);
|
|
109
|
-
};
|
|
110
|
-
return {
|
|
111
|
-
[Symbol.asyncIterator]() {
|
|
112
|
-
return this;
|
|
113
|
-
},
|
|
114
|
-
next: _next,
|
|
115
|
-
return: _return,
|
|
116
|
-
throw: _throw,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
_handleCompletedIncrementalData(completedIncrementalData, context) {
|
|
120
|
-
if (isCompletedExecutionGroup(completedIncrementalData)) {
|
|
121
|
-
this._handleCompletedExecutionGroup(completedIncrementalData, context);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
this._handleCompletedStreamItems(completedIncrementalData, context);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
_handleCompletedExecutionGroup(completedExecutionGroup, context) {
|
|
128
|
-
if (isFailedExecutionGroup(completedExecutionGroup)) {
|
|
129
|
-
for (const deferredFragmentRecord of completedExecutionGroup
|
|
130
|
-
.pendingExecutionGroup.deferredFragmentRecords) {
|
|
131
|
-
const id = deferredFragmentRecord.id;
|
|
132
|
-
if (!this._incrementalGraph.removeDeferredFragment(deferredFragmentRecord)) {
|
|
133
|
-
// This can occur if multiple deferred grouped field sets error for a fragment.
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
(id !== undefined) || invariant(false);
|
|
137
|
-
context.completed.push({
|
|
138
|
-
id,
|
|
139
|
-
errors: completedExecutionGroup.errors,
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
this._incrementalGraph.addCompletedSuccessfulExecutionGroup(completedExecutionGroup);
|
|
145
|
-
for (const deferredFragmentRecord of completedExecutionGroup
|
|
146
|
-
.pendingExecutionGroup.deferredFragmentRecords) {
|
|
147
|
-
const completion = this._incrementalGraph.completeDeferredFragment(deferredFragmentRecord);
|
|
148
|
-
if (completion === undefined) {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
const id = deferredFragmentRecord.id;
|
|
152
|
-
(id !== undefined) || invariant(false);
|
|
153
|
-
const incremental = context.incremental;
|
|
154
|
-
const { newRootNodes, successfulExecutionGroups } = completion;
|
|
155
|
-
context.pending.push(...this._toPendingResults(newRootNodes));
|
|
156
|
-
for (const successfulExecutionGroup of successfulExecutionGroups) {
|
|
157
|
-
const { bestId, subPath } = this._getBestIdAndSubPath(id, deferredFragmentRecord, successfulExecutionGroup);
|
|
158
|
-
const incrementalEntry = {
|
|
159
|
-
...successfulExecutionGroup.result,
|
|
160
|
-
id: bestId,
|
|
161
|
-
};
|
|
162
|
-
if (subPath !== undefined) {
|
|
163
|
-
incrementalEntry.subPath = subPath;
|
|
164
|
-
}
|
|
165
|
-
incremental.push(incrementalEntry);
|
|
166
|
-
}
|
|
167
|
-
context.completed.push({ id });
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
_handleCompletedStreamItems(streamItemsResult, context) {
|
|
171
|
-
const streamRecord = streamItemsResult.streamRecord;
|
|
172
|
-
const id = streamRecord.id;
|
|
173
|
-
(id !== undefined) || invariant(false);
|
|
174
|
-
if (streamItemsResult.errors !== undefined) {
|
|
175
|
-
context.completed.push({
|
|
176
|
-
id,
|
|
177
|
-
errors: streamItemsResult.errors,
|
|
178
|
-
});
|
|
179
|
-
this._incrementalGraph.removeStream(streamRecord);
|
|
180
|
-
if (isCancellableStreamRecord(streamRecord)) {
|
|
181
|
-
(this._context.cancellableStreams !== undefined) || invariant(false);
|
|
182
|
-
this._context.cancellableStreams.delete(streamRecord);
|
|
183
|
-
streamRecord.earlyReturn().catch(() => {
|
|
184
|
-
/* c8 ignore next 1 */
|
|
185
|
-
// ignore error
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
else if (streamItemsResult.result === undefined) {
|
|
190
|
-
context.completed.push({ id });
|
|
191
|
-
this._incrementalGraph.removeStream(streamRecord);
|
|
192
|
-
if (isCancellableStreamRecord(streamRecord)) {
|
|
193
|
-
(this._context.cancellableStreams !== undefined) || invariant(false);
|
|
194
|
-
this._context.cancellableStreams.delete(streamRecord);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
const incrementalEntry = {
|
|
199
|
-
id,
|
|
200
|
-
...streamItemsResult.result,
|
|
201
|
-
};
|
|
202
|
-
context.incremental.push(incrementalEntry);
|
|
203
|
-
const incrementalDataRecords = streamItemsResult.incrementalDataRecords;
|
|
204
|
-
if (incrementalDataRecords !== undefined) {
|
|
205
|
-
const newRootNodes = this._incrementalGraph.getNewRootNodes(incrementalDataRecords);
|
|
206
|
-
context.pending.push(...this._toPendingResults(newRootNodes));
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
_getBestIdAndSubPath(initialId, initialDeferredFragmentRecord, completedExecutionGroup) {
|
|
211
|
-
let maxLength = pathToArray(initialDeferredFragmentRecord.path).length;
|
|
212
|
-
let bestId = initialId;
|
|
213
|
-
for (const deferredFragmentRecord of completedExecutionGroup
|
|
214
|
-
.pendingExecutionGroup.deferredFragmentRecords) {
|
|
215
|
-
if (deferredFragmentRecord === initialDeferredFragmentRecord) {
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
218
|
-
const id = deferredFragmentRecord.id;
|
|
219
|
-
// TODO: add test case for when an fragment has not been released, but might be processed for the shortest path.
|
|
220
|
-
/* c8 ignore next 3 */
|
|
221
|
-
if (id === undefined) {
|
|
222
|
-
continue;
|
|
223
|
-
}
|
|
224
|
-
const fragmentPath = pathToArray(deferredFragmentRecord.path);
|
|
225
|
-
const length = fragmentPath.length;
|
|
226
|
-
if (length > maxLength) {
|
|
227
|
-
maxLength = length;
|
|
228
|
-
bestId = id;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
const subPath = completedExecutionGroup.path.slice(maxLength);
|
|
232
|
-
return {
|
|
233
|
-
bestId,
|
|
234
|
-
subPath: subPath.length > 0 ? subPath : undefined,
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
async _returnAsyncIterators() {
|
|
238
|
-
const cancellableStreams = this._context.cancellableStreams;
|
|
239
|
-
if (cancellableStreams === undefined) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
const promises = [];
|
|
243
|
-
for (const streamRecord of cancellableStreams) {
|
|
244
|
-
if (streamRecord.earlyReturn !== undefined) {
|
|
245
|
-
promises.push(streamRecord.earlyReturn());
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
await Promise.all(promises);
|
|
249
|
-
}
|
|
250
|
-
async _returnAsyncIteratorsIgnoringErrors() {
|
|
251
|
-
await this._returnAsyncIterators().catch(() => {
|
|
252
|
-
// Ignore errors
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
//# sourceMappingURL=IncrementalPublisher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IncrementalPublisher.js","sourceRoot":"","sources":["../../src/execution/IncrementalPublisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iCAAgC;AAEpD,OAAO,EAAE,WAAW,EAAE,4BAA2B;AAKjD,OAAO,EAAE,gBAAgB,EAAE,+BAA8B;AAkBzD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,GACvB,oBAAmB;AAEpB,MAAM,UAAU,wBAAwB,CACtC,OAAoC,EACpC,MAAuB,EACvB,MAA+C,EAC/C,sBAA4D;IAE5D,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC/D,OAAO,oBAAoB,CAAC,aAAa,CACvC,MAAM,EACN,MAAM,EACN,sBAAsB,CACvB,CAAC;AACJ,CAAC;AAaD;;;;;GAKG;AACH,MAAM,oBAAoB;IAKxB,YAAY,OAAoC;QAC9C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,iBAAiB,GAAG,IAAI,gBAAgB,EAAE,CAAC;IAClD,CAAC;IAED,aAAa,CACX,IAAqB,EACrB,MAA+C,EAC/C,sBAA4D;QAE5D,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,eAAe,CACzD,sBAAsB,CACvB,CAAC;QAEF,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;QAErD,MAAM,aAAa,GACjB,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,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { invariant } from '../jsutils/invariant.js';\nimport type { ObjMap } from '../jsutils/ObjMap.js';\nimport { pathToArray } from '../jsutils/Path.js';\n\nimport type { GraphQLError } from '../error/GraphQLError.js';\n\nimport type { AbortSignalListener } from './AbortSignalListener.js';\nimport { IncrementalGraph } from './IncrementalGraph.js';\nimport type {\n CancellableStreamRecord,\n CompletedExecutionGroup,\n CompletedResult,\n DeferredFragmentRecord,\n DeliveryGroup,\n ExperimentalIncrementalExecutionResults,\n IncrementalDataRecord,\n IncrementalDataRecordResult,\n IncrementalDeferResult,\n IncrementalResult,\n IncrementalStreamResult,\n InitialIncrementalExecutionResult,\n PendingResult,\n StreamItemsResult,\n SubsequentIncrementalExecutionResult,\n} from './types.js';\nimport {\n isCancellableStreamRecord,\n isCompletedExecutionGroup,\n isFailedExecutionGroup,\n} from './types.js';\n\nexport function buildIncrementalResponse(\n context: IncrementalPublisherContext,\n result: ObjMap<unknown>,\n errors: ReadonlyArray<GraphQLError> | undefined,\n incrementalDataRecords: ReadonlyArray<IncrementalDataRecord>,\n): ExperimentalIncrementalExecutionResults {\n const incrementalPublisher = new IncrementalPublisher(context);\n return incrementalPublisher.buildResponse(\n result,\n errors,\n incrementalDataRecords,\n );\n}\n\ninterface IncrementalPublisherContext {\n abortSignalListener: AbortSignalListener | undefined;\n cancellableStreams: Set<CancellableStreamRecord> | undefined;\n}\n\ninterface SubsequentIncrementalExecutionResultContext {\n pending: Array<PendingResult>;\n incremental: Array<IncrementalResult>;\n completed: Array<CompletedResult>;\n}\n\n/**\n * This class is used to publish incremental results to the client, enabling semi-concurrent\n * execution while preserving result order.\n *\n * @internal\n */\nclass IncrementalPublisher {\n private _context: IncrementalPublisherContext;\n private _nextId: number;\n private _incrementalGraph: IncrementalGraph;\n\n constructor(context: IncrementalPublisherContext) {\n this._context = context;\n this._nextId = 0;\n this._incrementalGraph = new IncrementalGraph();\n }\n\n buildResponse(\n data: ObjMap<unknown>,\n errors: ReadonlyArray<GraphQLError> | undefined,\n incrementalDataRecords: ReadonlyArray<IncrementalDataRecord>,\n ): ExperimentalIncrementalExecutionResults {\n const newRootNodes = this._incrementalGraph.getNewRootNodes(\n incrementalDataRecords,\n );\n\n const pending = this._toPendingResults(newRootNodes);\n\n const initialResult: InitialIncrementalExecutionResult =\n errors === undefined\n ? { data, pending, hasNext: true }\n : { errors, data, pending, hasNext: true };\n\n return {\n initialResult,\n subsequentResults: this._subscribe(),\n };\n }\n\n private _toPendingResults(\n newRootNodes: ReadonlyArray<DeliveryGroup>,\n ): Array<PendingResult> {\n const pendingResults: Array<PendingResult> = [];\n for (const node of newRootNodes) {\n const id = String(this._getNextId());\n node.id = id;\n const pendingResult: PendingResult = {\n id,\n path: pathToArray(node.path),\n };\n if (node.label !== undefined) {\n pendingResult.label = node.label;\n }\n pendingResults.push(pendingResult);\n }\n return pendingResults;\n }\n\n private _getNextId(): string {\n return String(this._nextId++);\n }\n\n private _subscribe(): AsyncGenerator<\n SubsequentIncrementalExecutionResult,\n void,\n void\n > {\n let isDone = false;\n\n const _next = async (): Promise<\n IteratorResult<SubsequentIncrementalExecutionResult, void>\n > => {\n if (isDone) {\n this._context.abortSignalListener?.disconnect();\n await this._returnAsyncIteratorsIgnoringErrors();\n return { value: undefined, done: true };\n }\n\n const context: SubsequentIncrementalExecutionResultContext = {\n pending: [],\n incremental: [],\n completed: [],\n };\n\n let batch: Iterable<IncrementalDataRecordResult> | undefined =\n this._incrementalGraph.currentCompletedBatch();\n do {\n for (const completedResult of batch) {\n this._handleCompletedIncrementalData(completedResult, context);\n }\n\n const { incremental, completed } = context;\n if (incremental.length > 0 || completed.length > 0) {\n const hasNext = this._incrementalGraph.hasNext();\n\n if (!hasNext) {\n isDone = true;\n }\n\n const subsequentIncrementalExecutionResult: SubsequentIncrementalExecutionResult =\n { hasNext };\n\n const pending = context.pending;\n if (pending.length > 0) {\n subsequentIncrementalExecutionResult.pending = pending;\n }\n if (incremental.length > 0) {\n subsequentIncrementalExecutionResult.incremental = incremental;\n }\n if (completed.length > 0) {\n subsequentIncrementalExecutionResult.completed = completed;\n }\n\n return { value: subsequentIncrementalExecutionResult, done: false };\n }\n\n // eslint-disable-next-line no-await-in-loop\n batch = await this._incrementalGraph.nextCompletedBatch();\n } while (batch !== undefined);\n\n // TODO: add test for this case\n /* c8 ignore next */\n this._context.abortSignalListener?.disconnect();\n await this._returnAsyncIteratorsIgnoringErrors();\n return { value: undefined, done: true };\n };\n\n const _return = async (): Promise<\n IteratorResult<SubsequentIncrementalExecutionResult, void>\n > => {\n isDone = true;\n this._incrementalGraph.abort();\n await this._returnAsyncIterators();\n return { value: undefined, done: true };\n };\n\n const _throw = async (\n error?: unknown,\n ): Promise<IteratorResult<SubsequentIncrementalExecutionResult, void>> => {\n isDone = true;\n this._incrementalGraph.abort();\n await this._returnAsyncIterators();\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n return Promise.reject(error);\n };\n\n return {\n [Symbol.asyncIterator]() {\n return this;\n },\n next: _next,\n return: _return,\n throw: _throw,\n };\n }\n\n private _handleCompletedIncrementalData(\n completedIncrementalData: IncrementalDataRecordResult,\n context: SubsequentIncrementalExecutionResultContext,\n ): void {\n if (isCompletedExecutionGroup(completedIncrementalData)) {\n this._handleCompletedExecutionGroup(completedIncrementalData, context);\n } else {\n this._handleCompletedStreamItems(completedIncrementalData, context);\n }\n }\n\n private _handleCompletedExecutionGroup(\n completedExecutionGroup: CompletedExecutionGroup,\n context: SubsequentIncrementalExecutionResultContext,\n ): void {\n if (isFailedExecutionGroup(completedExecutionGroup)) {\n for (const deferredFragmentRecord of completedExecutionGroup\n .pendingExecutionGroup.deferredFragmentRecords) {\n const id = deferredFragmentRecord.id;\n if (\n !this._incrementalGraph.removeDeferredFragment(deferredFragmentRecord)\n ) {\n // This can occur if multiple deferred grouped field sets error for a fragment.\n continue;\n }\n invariant(id !== undefined);\n context.completed.push({\n id,\n errors: completedExecutionGroup.errors,\n });\n }\n return;\n }\n\n this._incrementalGraph.addCompletedSuccessfulExecutionGroup(\n completedExecutionGroup,\n );\n\n for (const deferredFragmentRecord of completedExecutionGroup\n .pendingExecutionGroup.deferredFragmentRecords) {\n const completion = this._incrementalGraph.completeDeferredFragment(\n deferredFragmentRecord,\n );\n if (completion === undefined) {\n continue;\n }\n const id = deferredFragmentRecord.id;\n invariant(id !== undefined);\n const incremental = context.incremental;\n const { newRootNodes, successfulExecutionGroups } = completion;\n context.pending.push(...this._toPendingResults(newRootNodes));\n for (const successfulExecutionGroup of successfulExecutionGroups) {\n const { bestId, subPath } = this._getBestIdAndSubPath(\n id,\n deferredFragmentRecord,\n successfulExecutionGroup,\n );\n const incrementalEntry: IncrementalDeferResult = {\n ...successfulExecutionGroup.result,\n id: bestId,\n };\n if (subPath !== undefined) {\n incrementalEntry.subPath = subPath;\n }\n incremental.push(incrementalEntry);\n }\n context.completed.push({ id });\n }\n }\n\n private _handleCompletedStreamItems(\n streamItemsResult: StreamItemsResult,\n context: SubsequentIncrementalExecutionResultContext,\n ): void {\n const streamRecord = streamItemsResult.streamRecord;\n const id = streamRecord.id;\n invariant(id !== undefined);\n if (streamItemsResult.errors !== undefined) {\n context.completed.push({\n id,\n errors: streamItemsResult.errors,\n });\n this._incrementalGraph.removeStream(streamRecord);\n if (isCancellableStreamRecord(streamRecord)) {\n invariant(this._context.cancellableStreams !== undefined);\n this._context.cancellableStreams.delete(streamRecord);\n streamRecord.earlyReturn().catch(() => {\n /* c8 ignore next 1 */\n // ignore error\n });\n }\n } else if (streamItemsResult.result === undefined) {\n context.completed.push({ id });\n this._incrementalGraph.removeStream(streamRecord);\n if (isCancellableStreamRecord(streamRecord)) {\n invariant(this._context.cancellableStreams !== undefined);\n this._context.cancellableStreams.delete(streamRecord);\n }\n } else {\n const incrementalEntry: IncrementalStreamResult = {\n id,\n ...streamItemsResult.result,\n };\n\n context.incremental.push(incrementalEntry);\n\n const incrementalDataRecords = streamItemsResult.incrementalDataRecords;\n if (incrementalDataRecords !== undefined) {\n const newRootNodes = this._incrementalGraph.getNewRootNodes(\n incrementalDataRecords,\n );\n context.pending.push(...this._toPendingResults(newRootNodes));\n }\n }\n }\n\n private _getBestIdAndSubPath(\n initialId: string,\n initialDeferredFragmentRecord: DeferredFragmentRecord,\n completedExecutionGroup: CompletedExecutionGroup,\n ): { bestId: string; subPath: ReadonlyArray<string | number> | undefined } {\n let maxLength = pathToArray(initialDeferredFragmentRecord.path).length;\n let bestId = initialId;\n\n for (const deferredFragmentRecord of completedExecutionGroup\n .pendingExecutionGroup.deferredFragmentRecords) {\n if (deferredFragmentRecord === initialDeferredFragmentRecord) {\n continue;\n }\n const id = deferredFragmentRecord.id;\n // TODO: add test case for when an fragment has not been released, but might be processed for the shortest path.\n /* c8 ignore next 3 */\n if (id === undefined) {\n continue;\n }\n const fragmentPath = pathToArray(deferredFragmentRecord.path);\n const length = fragmentPath.length;\n if (length > maxLength) {\n maxLength = length;\n bestId = id;\n }\n }\n const subPath = completedExecutionGroup.path.slice(maxLength);\n return {\n bestId,\n subPath: subPath.length > 0 ? subPath : undefined,\n };\n }\n\n private async _returnAsyncIterators(): Promise<void> {\n const cancellableStreams = this._context.cancellableStreams;\n if (cancellableStreams === undefined) {\n return;\n }\n const promises: Array<Promise<unknown>> = [];\n for (const streamRecord of cancellableStreams) {\n if (streamRecord.earlyReturn !== undefined) {\n promises.push(streamRecord.earlyReturn());\n }\n }\n await Promise.all(promises);\n }\n\n private async _returnAsyncIteratorsIgnoringErrors(): Promise<void> {\n await this._returnAsyncIterators().catch(() => {\n // Ignore errors\n });\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildExecutionPlan.js","sourceRoot":"","sources":["../../src/execution/buildExecutionPlan.ts"],"names":[],"mappings":";;AAgBA,gDAgCC;AAhDD,wDAAkD;AAClD,0DAAoD;AAepD,SAAgB,kBAAkB,CAChC,uBAAwC,EACxC,oBAAmC,IAAI,GAAG,EAAc;IAExD,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,CAAC,gBAAgB,CAAC;QAC3E,OAAO,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACtC,IAAI,qBAAqB,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBAChD,qBAAqB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBACzC,MAAM;YACR,CAAC;YACD,gBAAgB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC","sourcesContent":["import { getBySet } from '../jsutils/getBySet.js';\nimport { isSameSet } from '../jsutils/isSameSet.js';\n\nimport type {\n DeferUsage,\n FieldDetailsList,\n GroupedFieldSet,\n} from './collectFields.js';\n\nexport type DeferUsageSet = ReadonlySet<DeferUsage>;\n\nexport interface ExecutionPlan {\n groupedFieldSet: GroupedFieldSet;\n newGroupedFieldSets: Map<DeferUsageSet, GroupedFieldSet>;\n}\n\nexport function buildExecutionPlan(\n originalGroupedFieldSet: GroupedFieldSet,\n parentDeferUsages: DeferUsageSet = new Set<DeferUsage>(),\n): ExecutionPlan {\n const groupedFieldSet = new Map<string, FieldDetailsList>();\n const newGroupedFieldSets = new Map<\n DeferUsageSet,\n Map<string, FieldDetailsList>\n >();\n for (const [responseKey, fieldDetailsList] of originalGroupedFieldSet) {\n const filteredDeferUsageSet = getFilteredDeferUsageSet(fieldDetailsList);\n\n if (isSameSet(filteredDeferUsageSet, parentDeferUsages)) {\n groupedFieldSet.set(responseKey, fieldDetailsList);\n continue;\n }\n\n let newGroupedFieldSet = getBySet(\n newGroupedFieldSets,\n filteredDeferUsageSet,\n );\n if (newGroupedFieldSet === undefined) {\n newGroupedFieldSet = new Map();\n newGroupedFieldSets.set(filteredDeferUsageSet, newGroupedFieldSet);\n }\n newGroupedFieldSet.set(responseKey, fieldDetailsList);\n }\n\n return {\n groupedFieldSet,\n newGroupedFieldSets,\n };\n}\n\nfunction getFilteredDeferUsageSet(\n fieldDetailsList: FieldDetailsList,\n): ReadonlySet<DeferUsage> {\n const filteredDeferUsageSet = new Set<DeferUsage>();\n for (const fieldDetails of fieldDetailsList) {\n const deferUsage = fieldDetails.deferUsage;\n if (deferUsage === undefined) {\n filteredDeferUsageSet.clear();\n return filteredDeferUsageSet;\n }\n filteredDeferUsageSet.add(deferUsage);\n }\n\n for (const deferUsage of filteredDeferUsageSet) {\n let parentDeferUsage: DeferUsage | undefined = deferUsage.parentDeferUsage;\n while (parentDeferUsage !== undefined) {\n if (filteredDeferUsageSet.has(parentDeferUsage)) {\n filteredDeferUsageSet.delete(deferUsage);\n break;\n }\n parentDeferUsage = parentDeferUsage.parentDeferUsage;\n }\n }\n return filteredDeferUsageSet;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildExecutionPlan.js","sourceRoot":"","sources":["../../src/execution/buildExecutionPlan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gCAA+B;AAClD,OAAO,EAAE,SAAS,EAAE,iCAAgC;AAepD,MAAM,UAAU,kBAAkB,CAChC,uBAAwC,EACxC,oBAAmC,IAAI,GAAG,EAAc;IAExD,MAAM,eAAe,GAAG,IAAI,GAAG,EAA4B,CAAC;IAC5D,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAGhC,CAAC;IACJ,KAAK,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAAC,IAAI,uBAAuB,EAAE,CAAC;QACtE,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;QAEzE,IAAI,SAAS,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,EAAE,CAAC;YACxD,eAAe,CAAC,GAAG,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;YACnD,SAAS;QACX,CAAC;QAED,IAAI,kBAAkB,GAAG,QAAQ,CAC/B,mBAAmB,EACnB,qBAAqB,CACtB,CAAC;QACF,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;YACrC,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAC;YAC/B,mBAAmB,CAAC,GAAG,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;QACrE,CAAC;QACD,kBAAkB,CAAC,GAAG,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IACxD,CAAC;IAED,OAAO;QACL,eAAe;QACf,mBAAmB;KACpB,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAC/B,gBAAkC;IAElC,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAc,CAAC;IACpD,KAAK,MAAM,YAAY,IAAI,gBAAgB,EAAE,CAAC;QAC5C,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;QAC3C,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,qBAAqB,CAAC,KAAK,EAAE,CAAC;YAC9B,OAAO,qBAAqB,CAAC;QAC/B,CAAC;QACD,qBAAqB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,MAAM,UAAU,IAAI,qBAAqB,EAAE,CAAC;QAC/C,IAAI,gBAAgB,GAA2B,UAAU,CAAC,gBAAgB,CAAC;QAC3E,OAAO,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACtC,IAAI,qBAAqB,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBAChD,qBAAqB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBACzC,MAAM;YACR,CAAC;YACD,gBAAgB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC","sourcesContent":["import { getBySet } from '../jsutils/getBySet.js';\nimport { isSameSet } from '../jsutils/isSameSet.js';\n\nimport type {\n DeferUsage,\n FieldDetailsList,\n GroupedFieldSet,\n} from './collectFields.js';\n\nexport type DeferUsageSet = ReadonlySet<DeferUsage>;\n\nexport interface ExecutionPlan {\n groupedFieldSet: GroupedFieldSet;\n newGroupedFieldSets: Map<DeferUsageSet, GroupedFieldSet>;\n}\n\nexport function buildExecutionPlan(\n originalGroupedFieldSet: GroupedFieldSet,\n parentDeferUsages: DeferUsageSet = new Set<DeferUsage>(),\n): ExecutionPlan {\n const groupedFieldSet = new Map<string, FieldDetailsList>();\n const newGroupedFieldSets = new Map<\n DeferUsageSet,\n Map<string, FieldDetailsList>\n >();\n for (const [responseKey, fieldDetailsList] of originalGroupedFieldSet) {\n const filteredDeferUsageSet = getFilteredDeferUsageSet(fieldDetailsList);\n\n if (isSameSet(filteredDeferUsageSet, parentDeferUsages)) {\n groupedFieldSet.set(responseKey, fieldDetailsList);\n continue;\n }\n\n let newGroupedFieldSet = getBySet(\n newGroupedFieldSets,\n filteredDeferUsageSet,\n );\n if (newGroupedFieldSet === undefined) {\n newGroupedFieldSet = new Map();\n newGroupedFieldSets.set(filteredDeferUsageSet, newGroupedFieldSet);\n }\n newGroupedFieldSet.set(responseKey, fieldDetailsList);\n }\n\n return {\n groupedFieldSet,\n newGroupedFieldSets,\n };\n}\n\nfunction getFilteredDeferUsageSet(\n fieldDetailsList: FieldDetailsList,\n): ReadonlySet<DeferUsage> {\n const filteredDeferUsageSet = new Set<DeferUsage>();\n for (const fieldDetails of fieldDetailsList) {\n const deferUsage = fieldDetails.deferUsage;\n if (deferUsage === undefined) {\n filteredDeferUsageSet.clear();\n return filteredDeferUsageSet;\n }\n filteredDeferUsageSet.add(deferUsage);\n }\n\n for (const deferUsage of filteredDeferUsageSet) {\n let parentDeferUsage: DeferUsage | undefined = deferUsage.parentDeferUsage;\n while (parentDeferUsage !== undefined) {\n if (filteredDeferUsageSet.has(parentDeferUsage)) {\n filteredDeferUsageSet.delete(deferUsage);\n break;\n }\n parentDeferUsage = parentDeferUsage.parentDeferUsage;\n }\n }\n return filteredDeferUsageSet;\n}\n"]}
|
package/execution/types.d.ts
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import type { BoxedPromiseOrValue } from '../jsutils/BoxedPromiseOrValue.js';
|
|
2
|
-
import type { ObjMap } from '../jsutils/ObjMap.js';
|
|
3
|
-
import type { Path } from '../jsutils/Path.js';
|
|
4
|
-
import type { GraphQLError, GraphQLFormattedError } from '../error/GraphQLError.js';
|
|
5
|
-
/**
|
|
6
|
-
* The result of GraphQL execution.
|
|
7
|
-
*
|
|
8
|
-
* - `errors` is included when any errors occurred as a non-empty array.
|
|
9
|
-
* - `data` is the result of a successful execution of the query.
|
|
10
|
-
* - `hasNext` is true if a future payload is expected.
|
|
11
|
-
* - `extensions` is reserved for adding non-standard properties.
|
|
12
|
-
* - `incremental` is a list of the results from defer/stream directives.
|
|
13
|
-
*/
|
|
14
|
-
export interface ExecutionResult<TData = ObjMap<unknown>, TExtensions = ObjMap<unknown>> {
|
|
15
|
-
errors?: ReadonlyArray<GraphQLError>;
|
|
16
|
-
data?: TData | null;
|
|
17
|
-
extensions?: TExtensions;
|
|
18
|
-
}
|
|
19
|
-
export interface FormattedExecutionResult<TData = ObjMap<unknown>, TExtensions = ObjMap<unknown>> {
|
|
20
|
-
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
21
|
-
data?: TData | null;
|
|
22
|
-
extensions?: TExtensions;
|
|
23
|
-
}
|
|
24
|
-
export interface ExperimentalIncrementalExecutionResults<TInitial = ObjMap<unknown>, TSubsequent = unknown, TExtensions = ObjMap<unknown>> {
|
|
25
|
-
initialResult: InitialIncrementalExecutionResult<TInitial, TExtensions>;
|
|
26
|
-
subsequentResults: AsyncGenerator<SubsequentIncrementalExecutionResult<TSubsequent, TExtensions>, void, void>;
|
|
27
|
-
}
|
|
28
|
-
export interface InitialIncrementalExecutionResult<TData = ObjMap<unknown>, TExtensions = ObjMap<unknown>> extends ExecutionResult<TData, TExtensions> {
|
|
29
|
-
data: TData;
|
|
30
|
-
pending: ReadonlyArray<PendingResult>;
|
|
31
|
-
hasNext: true;
|
|
32
|
-
extensions?: TExtensions;
|
|
33
|
-
}
|
|
34
|
-
export interface FormattedInitialIncrementalExecutionResult<TData = ObjMap<unknown>, TExtensions = ObjMap<unknown>> extends FormattedExecutionResult<TData, TExtensions> {
|
|
35
|
-
data: TData;
|
|
36
|
-
pending: ReadonlyArray<PendingResult>;
|
|
37
|
-
hasNext: boolean;
|
|
38
|
-
extensions?: TExtensions;
|
|
39
|
-
}
|
|
40
|
-
export interface SubsequentIncrementalExecutionResult<TData = unknown, TExtensions = ObjMap<unknown>> {
|
|
41
|
-
pending?: ReadonlyArray<PendingResult>;
|
|
42
|
-
incremental?: ReadonlyArray<IncrementalResult<TData, TExtensions>>;
|
|
43
|
-
completed?: ReadonlyArray<CompletedResult>;
|
|
44
|
-
hasNext: boolean;
|
|
45
|
-
extensions?: TExtensions;
|
|
46
|
-
}
|
|
47
|
-
export interface FormattedSubsequentIncrementalExecutionResult<TData = unknown, TExtensions = ObjMap<unknown>> {
|
|
48
|
-
hasNext: boolean;
|
|
49
|
-
pending?: ReadonlyArray<PendingResult>;
|
|
50
|
-
incremental?: ReadonlyArray<FormattedIncrementalResult<TData, TExtensions>>;
|
|
51
|
-
completed?: ReadonlyArray<FormattedCompletedResult>;
|
|
52
|
-
extensions?: TExtensions;
|
|
53
|
-
}
|
|
54
|
-
interface ExecutionGroupResult<TData = ObjMap<unknown>> {
|
|
55
|
-
errors?: ReadonlyArray<GraphQLError>;
|
|
56
|
-
data: TData;
|
|
57
|
-
}
|
|
58
|
-
export interface IncrementalDeferResult<TData = ObjMap<unknown>, TExtensions = ObjMap<unknown>> extends ExecutionGroupResult<TData> {
|
|
59
|
-
id: string;
|
|
60
|
-
subPath?: ReadonlyArray<string | number>;
|
|
61
|
-
extensions?: TExtensions;
|
|
62
|
-
}
|
|
63
|
-
export interface FormattedIncrementalDeferResult<TData = ObjMap<unknown>, TExtensions = ObjMap<unknown>> {
|
|
64
|
-
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
65
|
-
data: TData;
|
|
66
|
-
id: string;
|
|
67
|
-
subPath?: ReadonlyArray<string | number>;
|
|
68
|
-
extensions?: TExtensions;
|
|
69
|
-
}
|
|
70
|
-
interface StreamItemsRecordResult<TData = ReadonlyArray<unknown>> {
|
|
71
|
-
errors?: ReadonlyArray<GraphQLError>;
|
|
72
|
-
items: TData;
|
|
73
|
-
}
|
|
74
|
-
export interface IncrementalStreamResult<TData = ReadonlyArray<unknown>, TExtensions = ObjMap<unknown>> extends StreamItemsRecordResult<TData> {
|
|
75
|
-
id: string;
|
|
76
|
-
subPath?: ReadonlyArray<string | number>;
|
|
77
|
-
extensions?: TExtensions;
|
|
78
|
-
}
|
|
79
|
-
export interface FormattedIncrementalStreamResult<TData = Array<unknown>, TExtensions = ObjMap<unknown>> {
|
|
80
|
-
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
81
|
-
items: TData;
|
|
82
|
-
id: string;
|
|
83
|
-
subPath?: ReadonlyArray<string | number>;
|
|
84
|
-
extensions?: TExtensions;
|
|
85
|
-
}
|
|
86
|
-
export type IncrementalResult<TData = unknown, TExtensions = ObjMap<unknown>> = IncrementalDeferResult<TData, TExtensions> | IncrementalStreamResult<TData, TExtensions>;
|
|
87
|
-
export type FormattedIncrementalResult<TData = unknown, TExtensions = ObjMap<unknown>> = FormattedIncrementalDeferResult<TData, TExtensions> | FormattedIncrementalStreamResult<TData, TExtensions>;
|
|
88
|
-
export interface PendingResult {
|
|
89
|
-
id: string;
|
|
90
|
-
path: ReadonlyArray<string | number>;
|
|
91
|
-
label?: string;
|
|
92
|
-
}
|
|
93
|
-
export interface CompletedResult {
|
|
94
|
-
id: string;
|
|
95
|
-
errors?: ReadonlyArray<GraphQLError>;
|
|
96
|
-
}
|
|
97
|
-
export interface FormattedCompletedResult {
|
|
98
|
-
path: ReadonlyArray<string | number>;
|
|
99
|
-
label?: string;
|
|
100
|
-
errors?: ReadonlyArray<GraphQLError>;
|
|
101
|
-
}
|
|
102
|
-
export declare function isPendingExecutionGroup(incrementalDataRecord: IncrementalDataRecord): incrementalDataRecord is PendingExecutionGroup;
|
|
103
|
-
export type CompletedExecutionGroup = SuccessfulExecutionGroup | FailedExecutionGroup;
|
|
104
|
-
export declare function isCompletedExecutionGroup(incrementalDataRecordResult: IncrementalDataRecordResult): incrementalDataRecordResult is CompletedExecutionGroup;
|
|
105
|
-
export interface SuccessfulExecutionGroup {
|
|
106
|
-
pendingExecutionGroup: PendingExecutionGroup;
|
|
107
|
-
path: Array<string | number>;
|
|
108
|
-
result: ExecutionGroupResult;
|
|
109
|
-
incrementalDataRecords: ReadonlyArray<IncrementalDataRecord> | undefined;
|
|
110
|
-
errors?: never;
|
|
111
|
-
}
|
|
112
|
-
interface FailedExecutionGroup {
|
|
113
|
-
pendingExecutionGroup: PendingExecutionGroup;
|
|
114
|
-
path: Array<string | number>;
|
|
115
|
-
errors: ReadonlyArray<GraphQLError>;
|
|
116
|
-
result?: never;
|
|
117
|
-
}
|
|
118
|
-
export declare function isFailedExecutionGroup(completedExecutionGroup: CompletedExecutionGroup): completedExecutionGroup is FailedExecutionGroup;
|
|
119
|
-
type ThunkIncrementalResult<T> = BoxedPromiseOrValue<T> | (() => BoxedPromiseOrValue<T>);
|
|
120
|
-
export interface PendingExecutionGroup {
|
|
121
|
-
deferredFragmentRecords: ReadonlyArray<DeferredFragmentRecord>;
|
|
122
|
-
result: ThunkIncrementalResult<CompletedExecutionGroup>;
|
|
123
|
-
}
|
|
124
|
-
export type DeliveryGroup = DeferredFragmentRecord | StreamRecord;
|
|
125
|
-
/** @internal */
|
|
126
|
-
export declare class DeferredFragmentRecord {
|
|
127
|
-
path: Path | undefined;
|
|
128
|
-
label: string | undefined;
|
|
129
|
-
id?: string | undefined;
|
|
130
|
-
parent: DeferredFragmentRecord | undefined;
|
|
131
|
-
pendingExecutionGroups: Set<PendingExecutionGroup>;
|
|
132
|
-
successfulExecutionGroups: Set<SuccessfulExecutionGroup>;
|
|
133
|
-
children: Set<DeliveryGroup>;
|
|
134
|
-
constructor(path: Path | undefined, label: string | undefined, parent: DeferredFragmentRecord | undefined);
|
|
135
|
-
}
|
|
136
|
-
export declare function isDeferredFragmentRecord(deliveryGroup: DeliveryGroup): deliveryGroup is DeferredFragmentRecord;
|
|
137
|
-
export interface StreamItemResult {
|
|
138
|
-
item?: unknown;
|
|
139
|
-
incrementalDataRecords?: ReadonlyArray<IncrementalDataRecord> | undefined;
|
|
140
|
-
errors?: ReadonlyArray<GraphQLError> | undefined;
|
|
141
|
-
}
|
|
142
|
-
export type StreamItemRecord = ThunkIncrementalResult<StreamItemResult>;
|
|
143
|
-
export interface StreamRecord {
|
|
144
|
-
path: Path;
|
|
145
|
-
label: string | undefined;
|
|
146
|
-
id?: string | undefined;
|
|
147
|
-
streamItemQueue: Array<StreamItemRecord>;
|
|
148
|
-
}
|
|
149
|
-
export interface StreamItemsResult {
|
|
150
|
-
streamRecord: StreamRecord;
|
|
151
|
-
errors?: ReadonlyArray<GraphQLError>;
|
|
152
|
-
result?: StreamItemsRecordResult;
|
|
153
|
-
incrementalDataRecords?: ReadonlyArray<IncrementalDataRecord> | undefined;
|
|
154
|
-
}
|
|
155
|
-
export interface CancellableStreamRecord extends StreamRecord {
|
|
156
|
-
earlyReturn: () => Promise<unknown>;
|
|
157
|
-
}
|
|
158
|
-
export declare function isCancellableStreamRecord(deliveryGroup: DeliveryGroup): deliveryGroup is CancellableStreamRecord;
|
|
159
|
-
export type IncrementalDataRecord = PendingExecutionGroup | StreamRecord;
|
|
160
|
-
export type IncrementalDataRecordResult = CompletedExecutionGroup | StreamItemsResult;
|
|
161
|
-
export {};
|
package/execution/types.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeferredFragmentRecord = void 0;
|
|
4
|
-
exports.isPendingExecutionGroup = isPendingExecutionGroup;
|
|
5
|
-
exports.isCompletedExecutionGroup = isCompletedExecutionGroup;
|
|
6
|
-
exports.isFailedExecutionGroup = isFailedExecutionGroup;
|
|
7
|
-
exports.isDeferredFragmentRecord = isDeferredFragmentRecord;
|
|
8
|
-
exports.isCancellableStreamRecord = isCancellableStreamRecord;
|
|
9
|
-
function isPendingExecutionGroup(incrementalDataRecord) {
|
|
10
|
-
return 'deferredFragmentRecords' in incrementalDataRecord;
|
|
11
|
-
}
|
|
12
|
-
function isCompletedExecutionGroup(incrementalDataRecordResult) {
|
|
13
|
-
return 'pendingExecutionGroup' in incrementalDataRecordResult;
|
|
14
|
-
}
|
|
15
|
-
function isFailedExecutionGroup(completedExecutionGroup) {
|
|
16
|
-
return completedExecutionGroup.errors !== undefined;
|
|
17
|
-
}
|
|
18
|
-
/** @internal */
|
|
19
|
-
class DeferredFragmentRecord {
|
|
20
|
-
constructor(path, label, parent) {
|
|
21
|
-
this.path = path;
|
|
22
|
-
this.label = label;
|
|
23
|
-
this.parent = parent;
|
|
24
|
-
this.pendingExecutionGroups = new Set();
|
|
25
|
-
this.successfulExecutionGroups = new Set();
|
|
26
|
-
this.children = new Set();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.DeferredFragmentRecord = DeferredFragmentRecord;
|
|
30
|
-
function isDeferredFragmentRecord(deliveryGroup) {
|
|
31
|
-
return deliveryGroup instanceof DeferredFragmentRecord;
|
|
32
|
-
}
|
|
33
|
-
function isCancellableStreamRecord(deliveryGroup) {
|
|
34
|
-
return 'earlyReturn' in deliveryGroup;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=types.js.map
|
package/execution/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/execution/types.ts"],"names":[],"mappings":";;;AAyKA,0DAIC;AAMD,8DAIC;AAiBD,wDAIC;AAqCD,4DAIC;AA4BD,8DAIC;AA5GD,SAAgB,uBAAuB,CACrC,qBAA4C;IAE5C,OAAO,yBAAyB,IAAI,qBAAqB,CAAC;AAC5D,CAAC;AAMD,SAAgB,yBAAyB,CACvC,2BAAwD;IAExD,OAAO,uBAAuB,IAAI,2BAA2B,CAAC;AAChE,CAAC;AAiBD,SAAgB,sBAAsB,CACpC,uBAAgD;IAEhD,OAAO,uBAAuB,CAAC,MAAM,KAAK,SAAS,CAAC;AACtD,CAAC;AAaD,gBAAgB;AAChB,MAAa,sBAAsB;IASjC,YACE,IAAsB,EACtB,KAAyB,EACzB,MAA0C;QAE1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,sBAAsB,GAAG,IAAI,GAAG,EAAE,CAAC;QACxC,IAAI,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;IAC5B,CAAC;CACF;AArBD,wDAqBC;AAED,SAAgB,wBAAwB,CACtC,aAA4B;IAE5B,OAAO,aAAa,YAAY,sBAAsB,CAAC;AACzD,CAAC;AA4BD,SAAgB,yBAAyB,CACvC,aAA4B;IAE5B,OAAO,aAAa,IAAI,aAAa,CAAC;AACxC,CAAC","sourcesContent":["import type { BoxedPromiseOrValue } from '../jsutils/BoxedPromiseOrValue.js';\nimport type { ObjMap } from '../jsutils/ObjMap.js';\nimport type { Path } from '../jsutils/Path.js';\n\nimport type {\n GraphQLError,\n GraphQLFormattedError,\n} from '../error/GraphQLError.js';\n\n/**\n * The result of GraphQL execution.\n *\n * - `errors` is included when any errors occurred as a non-empty array.\n * - `data` is the result of a successful execution of the query.\n * - `hasNext` is true if a future payload is expected.\n * - `extensions` is reserved for adding non-standard properties.\n * - `incremental` is a list of the results from defer/stream directives.\n */\nexport interface ExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLError>;\n data?: TData | null;\n extensions?: TExtensions;\n}\n\nexport interface FormattedExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n data?: TData | null;\n extensions?: TExtensions;\n}\n\nexport interface ExperimentalIncrementalExecutionResults<\n TInitial = ObjMap<unknown>,\n TSubsequent = unknown,\n TExtensions = ObjMap<unknown>,\n> {\n initialResult: InitialIncrementalExecutionResult<TInitial, TExtensions>;\n subsequentResults: AsyncGenerator<\n SubsequentIncrementalExecutionResult<TSubsequent, TExtensions>,\n void,\n void\n >;\n}\n\nexport interface InitialIncrementalExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends ExecutionResult<TData, TExtensions> {\n data: TData;\n pending: ReadonlyArray<PendingResult>;\n hasNext: true;\n extensions?: TExtensions;\n}\n\nexport interface FormattedInitialIncrementalExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends FormattedExecutionResult<TData, TExtensions> {\n data: TData;\n pending: ReadonlyArray<PendingResult>;\n hasNext: boolean;\n extensions?: TExtensions;\n}\n\nexport interface SubsequentIncrementalExecutionResult<\n TData = unknown,\n TExtensions = ObjMap<unknown>,\n> {\n pending?: ReadonlyArray<PendingResult>;\n incremental?: ReadonlyArray<IncrementalResult<TData, TExtensions>>;\n completed?: ReadonlyArray<CompletedResult>;\n hasNext: boolean;\n extensions?: TExtensions;\n}\n\nexport interface FormattedSubsequentIncrementalExecutionResult<\n TData = unknown,\n TExtensions = ObjMap<unknown>,\n> {\n hasNext: boolean;\n pending?: ReadonlyArray<PendingResult>;\n incremental?: ReadonlyArray<FormattedIncrementalResult<TData, TExtensions>>;\n completed?: ReadonlyArray<FormattedCompletedResult>;\n extensions?: TExtensions;\n}\n\ninterface ExecutionGroupResult<TData = ObjMap<unknown>> {\n errors?: ReadonlyArray<GraphQLError>;\n data: TData;\n}\n\nexport interface IncrementalDeferResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends ExecutionGroupResult<TData> {\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\nexport interface FormattedIncrementalDeferResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n data: TData;\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\ninterface StreamItemsRecordResult<TData = ReadonlyArray<unknown>> {\n errors?: ReadonlyArray<GraphQLError>;\n items: TData;\n}\n\nexport interface IncrementalStreamResult<\n TData = ReadonlyArray<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends StreamItemsRecordResult<TData> {\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\nexport interface FormattedIncrementalStreamResult<\n TData = Array<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n items: TData;\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\nexport type IncrementalResult<TData = unknown, TExtensions = ObjMap<unknown>> =\n | IncrementalDeferResult<TData, TExtensions>\n | IncrementalStreamResult<TData, TExtensions>;\n\nexport type FormattedIncrementalResult<\n TData = unknown,\n TExtensions = ObjMap<unknown>,\n> =\n | FormattedIncrementalDeferResult<TData, TExtensions>\n | FormattedIncrementalStreamResult<TData, TExtensions>;\n\nexport interface PendingResult {\n id: string;\n path: ReadonlyArray<string | number>;\n label?: string;\n}\n\nexport interface CompletedResult {\n id: string;\n errors?: ReadonlyArray<GraphQLError>;\n}\n\nexport interface FormattedCompletedResult {\n path: ReadonlyArray<string | number>;\n label?: string;\n errors?: ReadonlyArray<GraphQLError>;\n}\n\nexport function isPendingExecutionGroup(\n incrementalDataRecord: IncrementalDataRecord,\n): incrementalDataRecord is PendingExecutionGroup {\n return 'deferredFragmentRecords' in incrementalDataRecord;\n}\n\nexport type CompletedExecutionGroup =\n | SuccessfulExecutionGroup\n | FailedExecutionGroup;\n\nexport function isCompletedExecutionGroup(\n incrementalDataRecordResult: IncrementalDataRecordResult,\n): incrementalDataRecordResult is CompletedExecutionGroup {\n return 'pendingExecutionGroup' in incrementalDataRecordResult;\n}\n\nexport interface SuccessfulExecutionGroup {\n pendingExecutionGroup: PendingExecutionGroup;\n path: Array<string | number>;\n result: ExecutionGroupResult;\n incrementalDataRecords: ReadonlyArray<IncrementalDataRecord> | undefined;\n errors?: never;\n}\n\ninterface FailedExecutionGroup {\n pendingExecutionGroup: PendingExecutionGroup;\n path: Array<string | number>;\n errors: ReadonlyArray<GraphQLError>;\n result?: never;\n}\n\nexport function isFailedExecutionGroup(\n completedExecutionGroup: CompletedExecutionGroup,\n): completedExecutionGroup is FailedExecutionGroup {\n return completedExecutionGroup.errors !== undefined;\n}\n\ntype ThunkIncrementalResult<T> =\n | BoxedPromiseOrValue<T>\n | (() => BoxedPromiseOrValue<T>);\n\nexport interface PendingExecutionGroup {\n deferredFragmentRecords: ReadonlyArray<DeferredFragmentRecord>;\n result: ThunkIncrementalResult<CompletedExecutionGroup>;\n}\n\nexport type DeliveryGroup = DeferredFragmentRecord | StreamRecord;\n\n/** @internal */\nexport class DeferredFragmentRecord {\n path: Path | undefined;\n label: string | undefined;\n id?: string | undefined;\n parent: DeferredFragmentRecord | undefined;\n pendingExecutionGroups: Set<PendingExecutionGroup>;\n successfulExecutionGroups: Set<SuccessfulExecutionGroup>;\n children: Set<DeliveryGroup>;\n\n constructor(\n path: Path | undefined,\n label: string | undefined,\n parent: DeferredFragmentRecord | undefined,\n ) {\n this.path = path;\n this.label = label;\n this.parent = parent;\n this.pendingExecutionGroups = new Set();\n this.successfulExecutionGroups = new Set();\n this.children = new Set();\n }\n}\n\nexport function isDeferredFragmentRecord(\n deliveryGroup: DeliveryGroup,\n): deliveryGroup is DeferredFragmentRecord {\n return deliveryGroup instanceof DeferredFragmentRecord;\n}\n\nexport interface StreamItemResult {\n item?: unknown;\n incrementalDataRecords?: ReadonlyArray<IncrementalDataRecord> | undefined;\n errors?: ReadonlyArray<GraphQLError> | undefined;\n}\n\nexport type StreamItemRecord = ThunkIncrementalResult<StreamItemResult>;\n\nexport interface StreamRecord {\n path: Path;\n label: string | undefined;\n id?: string | undefined;\n streamItemQueue: Array<StreamItemRecord>;\n}\n\nexport interface StreamItemsResult {\n streamRecord: StreamRecord;\n errors?: ReadonlyArray<GraphQLError>;\n result?: StreamItemsRecordResult;\n incrementalDataRecords?: ReadonlyArray<IncrementalDataRecord> | undefined;\n}\n\nexport interface CancellableStreamRecord extends StreamRecord {\n earlyReturn: () => Promise<unknown>;\n}\n\nexport function isCancellableStreamRecord(\n deliveryGroup: DeliveryGroup,\n): deliveryGroup is CancellableStreamRecord {\n return 'earlyReturn' in deliveryGroup;\n}\n\nexport type IncrementalDataRecord = PendingExecutionGroup | StreamRecord;\n\nexport type IncrementalDataRecordResult =\n | CompletedExecutionGroup\n | StreamItemsResult;\n"]}
|
package/execution/types.mjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export function isPendingExecutionGroup(incrementalDataRecord) {
|
|
2
|
-
return 'deferredFragmentRecords' in incrementalDataRecord;
|
|
3
|
-
}
|
|
4
|
-
export function isCompletedExecutionGroup(incrementalDataRecordResult) {
|
|
5
|
-
return 'pendingExecutionGroup' in incrementalDataRecordResult;
|
|
6
|
-
}
|
|
7
|
-
export function isFailedExecutionGroup(completedExecutionGroup) {
|
|
8
|
-
return completedExecutionGroup.errors !== undefined;
|
|
9
|
-
}
|
|
10
|
-
/** @internal */
|
|
11
|
-
export class DeferredFragmentRecord {
|
|
12
|
-
constructor(path, label, parent) {
|
|
13
|
-
this.path = path;
|
|
14
|
-
this.label = label;
|
|
15
|
-
this.parent = parent;
|
|
16
|
-
this.pendingExecutionGroups = new Set();
|
|
17
|
-
this.successfulExecutionGroups = new Set();
|
|
18
|
-
this.children = new Set();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export function isDeferredFragmentRecord(deliveryGroup) {
|
|
22
|
-
return deliveryGroup instanceof DeferredFragmentRecord;
|
|
23
|
-
}
|
|
24
|
-
export function isCancellableStreamRecord(deliveryGroup) {
|
|
25
|
-
return 'earlyReturn' in deliveryGroup;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=types.js.map
|
package/execution/types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/execution/types.ts"],"names":[],"mappings":"AAyKA,MAAM,UAAU,uBAAuB,CACrC,qBAA4C;IAE5C,OAAO,yBAAyB,IAAI,qBAAqB,CAAC;AAC5D,CAAC;AAMD,MAAM,UAAU,yBAAyB,CACvC,2BAAwD;IAExD,OAAO,uBAAuB,IAAI,2BAA2B,CAAC;AAChE,CAAC;AAiBD,MAAM,UAAU,sBAAsB,CACpC,uBAAgD;IAEhD,OAAO,uBAAuB,CAAC,MAAM,KAAK,SAAS,CAAC;AACtD,CAAC;AAaD,gBAAgB;AAChB,MAAM,OAAO,sBAAsB;IASjC,YACE,IAAsB,EACtB,KAAyB,EACzB,MAA0C;QAE1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,sBAAsB,GAAG,IAAI,GAAG,EAAE,CAAC;QACxC,IAAI,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,UAAU,wBAAwB,CACtC,aAA4B;IAE5B,OAAO,aAAa,YAAY,sBAAsB,CAAC;AACzD,CAAC;AA4BD,MAAM,UAAU,yBAAyB,CACvC,aAA4B;IAE5B,OAAO,aAAa,IAAI,aAAa,CAAC;AACxC,CAAC","sourcesContent":["import type { BoxedPromiseOrValue } from '../jsutils/BoxedPromiseOrValue.js';\nimport type { ObjMap } from '../jsutils/ObjMap.js';\nimport type { Path } from '../jsutils/Path.js';\n\nimport type {\n GraphQLError,\n GraphQLFormattedError,\n} from '../error/GraphQLError.js';\n\n/**\n * The result of GraphQL execution.\n *\n * - `errors` is included when any errors occurred as a non-empty array.\n * - `data` is the result of a successful execution of the query.\n * - `hasNext` is true if a future payload is expected.\n * - `extensions` is reserved for adding non-standard properties.\n * - `incremental` is a list of the results from defer/stream directives.\n */\nexport interface ExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLError>;\n data?: TData | null;\n extensions?: TExtensions;\n}\n\nexport interface FormattedExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n data?: TData | null;\n extensions?: TExtensions;\n}\n\nexport interface ExperimentalIncrementalExecutionResults<\n TInitial = ObjMap<unknown>,\n TSubsequent = unknown,\n TExtensions = ObjMap<unknown>,\n> {\n initialResult: InitialIncrementalExecutionResult<TInitial, TExtensions>;\n subsequentResults: AsyncGenerator<\n SubsequentIncrementalExecutionResult<TSubsequent, TExtensions>,\n void,\n void\n >;\n}\n\nexport interface InitialIncrementalExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends ExecutionResult<TData, TExtensions> {\n data: TData;\n pending: ReadonlyArray<PendingResult>;\n hasNext: true;\n extensions?: TExtensions;\n}\n\nexport interface FormattedInitialIncrementalExecutionResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends FormattedExecutionResult<TData, TExtensions> {\n data: TData;\n pending: ReadonlyArray<PendingResult>;\n hasNext: boolean;\n extensions?: TExtensions;\n}\n\nexport interface SubsequentIncrementalExecutionResult<\n TData = unknown,\n TExtensions = ObjMap<unknown>,\n> {\n pending?: ReadonlyArray<PendingResult>;\n incremental?: ReadonlyArray<IncrementalResult<TData, TExtensions>>;\n completed?: ReadonlyArray<CompletedResult>;\n hasNext: boolean;\n extensions?: TExtensions;\n}\n\nexport interface FormattedSubsequentIncrementalExecutionResult<\n TData = unknown,\n TExtensions = ObjMap<unknown>,\n> {\n hasNext: boolean;\n pending?: ReadonlyArray<PendingResult>;\n incremental?: ReadonlyArray<FormattedIncrementalResult<TData, TExtensions>>;\n completed?: ReadonlyArray<FormattedCompletedResult>;\n extensions?: TExtensions;\n}\n\ninterface ExecutionGroupResult<TData = ObjMap<unknown>> {\n errors?: ReadonlyArray<GraphQLError>;\n data: TData;\n}\n\nexport interface IncrementalDeferResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends ExecutionGroupResult<TData> {\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\nexport interface FormattedIncrementalDeferResult<\n TData = ObjMap<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n data: TData;\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\ninterface StreamItemsRecordResult<TData = ReadonlyArray<unknown>> {\n errors?: ReadonlyArray<GraphQLError>;\n items: TData;\n}\n\nexport interface IncrementalStreamResult<\n TData = ReadonlyArray<unknown>,\n TExtensions = ObjMap<unknown>,\n> extends StreamItemsRecordResult<TData> {\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\nexport interface FormattedIncrementalStreamResult<\n TData = Array<unknown>,\n TExtensions = ObjMap<unknown>,\n> {\n errors?: ReadonlyArray<GraphQLFormattedError>;\n items: TData;\n id: string;\n subPath?: ReadonlyArray<string | number>;\n extensions?: TExtensions;\n}\n\nexport type IncrementalResult<TData = unknown, TExtensions = ObjMap<unknown>> =\n | IncrementalDeferResult<TData, TExtensions>\n | IncrementalStreamResult<TData, TExtensions>;\n\nexport type FormattedIncrementalResult<\n TData = unknown,\n TExtensions = ObjMap<unknown>,\n> =\n | FormattedIncrementalDeferResult<TData, TExtensions>\n | FormattedIncrementalStreamResult<TData, TExtensions>;\n\nexport interface PendingResult {\n id: string;\n path: ReadonlyArray<string | number>;\n label?: string;\n}\n\nexport interface CompletedResult {\n id: string;\n errors?: ReadonlyArray<GraphQLError>;\n}\n\nexport interface FormattedCompletedResult {\n path: ReadonlyArray<string | number>;\n label?: string;\n errors?: ReadonlyArray<GraphQLError>;\n}\n\nexport function isPendingExecutionGroup(\n incrementalDataRecord: IncrementalDataRecord,\n): incrementalDataRecord is PendingExecutionGroup {\n return 'deferredFragmentRecords' in incrementalDataRecord;\n}\n\nexport type CompletedExecutionGroup =\n | SuccessfulExecutionGroup\n | FailedExecutionGroup;\n\nexport function isCompletedExecutionGroup(\n incrementalDataRecordResult: IncrementalDataRecordResult,\n): incrementalDataRecordResult is CompletedExecutionGroup {\n return 'pendingExecutionGroup' in incrementalDataRecordResult;\n}\n\nexport interface SuccessfulExecutionGroup {\n pendingExecutionGroup: PendingExecutionGroup;\n path: Array<string | number>;\n result: ExecutionGroupResult;\n incrementalDataRecords: ReadonlyArray<IncrementalDataRecord> | undefined;\n errors?: never;\n}\n\ninterface FailedExecutionGroup {\n pendingExecutionGroup: PendingExecutionGroup;\n path: Array<string | number>;\n errors: ReadonlyArray<GraphQLError>;\n result?: never;\n}\n\nexport function isFailedExecutionGroup(\n completedExecutionGroup: CompletedExecutionGroup,\n): completedExecutionGroup is FailedExecutionGroup {\n return completedExecutionGroup.errors !== undefined;\n}\n\ntype ThunkIncrementalResult<T> =\n | BoxedPromiseOrValue<T>\n | (() => BoxedPromiseOrValue<T>);\n\nexport interface PendingExecutionGroup {\n deferredFragmentRecords: ReadonlyArray<DeferredFragmentRecord>;\n result: ThunkIncrementalResult<CompletedExecutionGroup>;\n}\n\nexport type DeliveryGroup = DeferredFragmentRecord | StreamRecord;\n\n/** @internal */\nexport class DeferredFragmentRecord {\n path: Path | undefined;\n label: string | undefined;\n id?: string | undefined;\n parent: DeferredFragmentRecord | undefined;\n pendingExecutionGroups: Set<PendingExecutionGroup>;\n successfulExecutionGroups: Set<SuccessfulExecutionGroup>;\n children: Set<DeliveryGroup>;\n\n constructor(\n path: Path | undefined,\n label: string | undefined,\n parent: DeferredFragmentRecord | undefined,\n ) {\n this.path = path;\n this.label = label;\n this.parent = parent;\n this.pendingExecutionGroups = new Set();\n this.successfulExecutionGroups = new Set();\n this.children = new Set();\n }\n}\n\nexport function isDeferredFragmentRecord(\n deliveryGroup: DeliveryGroup,\n): deliveryGroup is DeferredFragmentRecord {\n return deliveryGroup instanceof DeferredFragmentRecord;\n}\n\nexport interface StreamItemResult {\n item?: unknown;\n incrementalDataRecords?: ReadonlyArray<IncrementalDataRecord> | undefined;\n errors?: ReadonlyArray<GraphQLError> | undefined;\n}\n\nexport type StreamItemRecord = ThunkIncrementalResult<StreamItemResult>;\n\nexport interface StreamRecord {\n path: Path;\n label: string | undefined;\n id?: string | undefined;\n streamItemQueue: Array<StreamItemRecord>;\n}\n\nexport interface StreamItemsResult {\n streamRecord: StreamRecord;\n errors?: ReadonlyArray<GraphQLError>;\n result?: StreamItemsRecordResult;\n incrementalDataRecords?: ReadonlyArray<IncrementalDataRecord> | undefined;\n}\n\nexport interface CancellableStreamRecord extends StreamRecord {\n earlyReturn: () => Promise<unknown>;\n}\n\nexport function isCancellableStreamRecord(\n deliveryGroup: DeliveryGroup,\n): deliveryGroup is CancellableStreamRecord {\n return 'earlyReturn' in deliveryGroup;\n}\n\nexport type IncrementalDataRecord = PendingExecutionGroup | StreamRecord;\n\nexport type IncrementalDataRecordResult =\n | CompletedExecutionGroup\n | StreamItemsResult;\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PromiseOrValue } from './PromiseOrValue.js';
|
|
2
|
-
/**
|
|
3
|
-
* A BoxedPromiseOrValue is a container for a value or promise where the value
|
|
4
|
-
* will be updated when the promise resolves.
|
|
5
|
-
*
|
|
6
|
-
* A BoxedPromiseOrValue may only be used with promises whose possible
|
|
7
|
-
* rejection has already been handled, otherwise this will lead to unhandled
|
|
8
|
-
* promise rejections.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
* */
|
|
12
|
-
export declare class BoxedPromiseOrValue<T> {
|
|
13
|
-
value: PromiseOrValue<T>;
|
|
14
|
-
constructor(value: PromiseOrValue<T>);
|
|
15
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BoxedPromiseOrValue = void 0;
|
|
4
|
-
const isPromise_js_1 = require("./isPromise.js");
|
|
5
|
-
/**
|
|
6
|
-
* A BoxedPromiseOrValue is a container for a value or promise where the value
|
|
7
|
-
* will be updated when the promise resolves.
|
|
8
|
-
*
|
|
9
|
-
* A BoxedPromiseOrValue may only be used with promises whose possible
|
|
10
|
-
* rejection has already been handled, otherwise this will lead to unhandled
|
|
11
|
-
* promise rejections.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
|
-
* */
|
|
15
|
-
class BoxedPromiseOrValue {
|
|
16
|
-
constructor(value) {
|
|
17
|
-
this.value = value;
|
|
18
|
-
if ((0, isPromise_js_1.isPromise)(value)) {
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
20
|
-
value.then((resolved) => {
|
|
21
|
-
this.value = resolved;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.BoxedPromiseOrValue = BoxedPromiseOrValue;
|
|
27
|
-
//# sourceMappingURL=BoxedPromiseOrValue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoxedPromiseOrValue.js","sourceRoot":"","sources":["../../src/jsutils/BoxedPromiseOrValue.ts"],"names":[],"mappings":";;;AAAA,iDAA2C;AAG3C;;;;;;;;;KASK;AACL,MAAa,mBAAmB;IAG9B,YAAY,KAAwB;QAClC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,IAAA,wBAAS,EAAC,KAAK,CAAC,EAAE,CAAC;YACrB,mEAAmE;YACnE,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACtB,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;YACxB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AAZD,kDAYC","sourcesContent":["import { isPromise } from './isPromise.js';\nimport type { PromiseOrValue } from './PromiseOrValue.js';\n\n/**\n * A BoxedPromiseOrValue is a container for a value or promise where the value\n * will be updated when the promise resolves.\n *\n * A BoxedPromiseOrValue may only be used with promises whose possible\n * rejection has already been handled, otherwise this will lead to unhandled\n * promise rejections.\n *\n * @internal\n * */\nexport class BoxedPromiseOrValue<T> {\n value: PromiseOrValue<T>;\n\n constructor(value: PromiseOrValue<T>) {\n this.value = value;\n if (isPromise(value)) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n value.then((resolved) => {\n this.value = resolved;\n });\n }\n }\n}\n"]}
|