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
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Queue = void 0;
|
|
4
|
+
const invariant_js_1 = require("../../jsutils/invariant.js");
|
|
5
|
+
const isPromise_js_1 = require("../../jsutils/isPromise.js");
|
|
6
|
+
const promiseWithResolvers_js_1 = require("../../jsutils/promiseWithResolvers.js");
|
|
7
|
+
const withConcurrentAbruptClose_js_1 = require("../withConcurrentAbruptClose.js");
|
|
8
|
+
/**
|
|
9
|
+
* A Queue is a lightweight async-generator primitive inspired by Brian Kim's
|
|
10
|
+
* Repeater (https://repeater.js.org, https://github.com/repeaterjs/repeater).
|
|
11
|
+
* The ergonomics are similar, but this implementation favors clarity over
|
|
12
|
+
* performance and gives producers flexibility to remain lazy, become eager, or
|
|
13
|
+
* live somewhere in between.
|
|
14
|
+
*
|
|
15
|
+
* The constructor takes an executor function and an optional `initialCapacity`.
|
|
16
|
+
* Executors receive `{ push, stop, onStop, started }` and may return `void` or
|
|
17
|
+
* a promise if they perform asynchronous setup. They call `push` whenever
|
|
18
|
+
* another item is ready, call `stop` when no more values will be produced
|
|
19
|
+
* (optionally supplying an error), register stop-time cleanup via `onStop`,
|
|
20
|
+
* and await `started` when setup should run only after iteration begins.
|
|
21
|
+
* Because `push`, `stop`, and `onStop` are plain functions, executors can
|
|
22
|
+
* hoist them into outside scopes or pass them to helpers. If the executor
|
|
23
|
+
* throws or its returned promise rejects, the queue treats it as `stop(error)`
|
|
24
|
+
* and propagates the failure.
|
|
25
|
+
*
|
|
26
|
+
* The `initialCapacity` argument (default `1`) governs backpressure. Capacity
|
|
27
|
+
* is the maximum number of buffered items allowed before a push must wait.
|
|
28
|
+
* When the backlog reaches capacity, `push` returns a promise that settles
|
|
29
|
+
* once consumption releases space; otherwise it returns `undefined`. Setting
|
|
30
|
+
* capacity to `1` yields a fully lazy queue (every push waits unless a prior
|
|
31
|
+
* item has been consumed); higher capacities buffer that many items eagerly.
|
|
32
|
+
* Capacity can be changed later via `setCapacity` and observed via
|
|
33
|
+
* `getCapacity`.
|
|
34
|
+
*
|
|
35
|
+
* `subscribe(reducer)` returns an async generator whose batches feed a generator
|
|
36
|
+
* of settled values into the reducer; whatever the reducer returns (other than
|
|
37
|
+
* `undefined`) becomes the yielded value for that batch. Calling `return()` on
|
|
38
|
+
* the subscription settles pending `next` calls thanks to `withConcurrent`,
|
|
39
|
+
* providing direct abort semantics rather than leaving `next()` suspended.
|
|
40
|
+
*
|
|
41
|
+
* 'forEachBatch(reducer)` is a convenience method that subscribes with the
|
|
42
|
+
* given reducer and runs it for each batch until the queue stops.
|
|
43
|
+
*
|
|
44
|
+
* Producers can stay lazy by awaiting `started`, using zero capacity, and
|
|
45
|
+
* awaiting each `push`. Skipping those waits while raising capacity makes the
|
|
46
|
+
* queue eager up to its configured limit. The `isStopped()` helper exposes
|
|
47
|
+
* whether the queue has fully stopped, which can be useful when the reducer
|
|
48
|
+
* function actually performs external work and wants to bail early without
|
|
49
|
+
* awaiting another `next`.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
class Queue {
|
|
54
|
+
constructor(executor, initialCapacity = 1) {
|
|
55
|
+
this._backlog = 0;
|
|
56
|
+
this._waiters = [];
|
|
57
|
+
this._entries = [];
|
|
58
|
+
this._isStopped = false;
|
|
59
|
+
this._stopRequested = false;
|
|
60
|
+
this._stopCleanupCallbacks = [];
|
|
61
|
+
this._batchRequests = new Set();
|
|
62
|
+
this._capacity = this._normalizeCapacity(initialCapacity);
|
|
63
|
+
const { promise: started, resolve: resolveStarted } =
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
65
|
+
(0, promiseWithResolvers_js_1.promiseWithResolvers)();
|
|
66
|
+
this._resolveStarted = resolveStarted;
|
|
67
|
+
try {
|
|
68
|
+
const result = executor({
|
|
69
|
+
push: this._push.bind(this),
|
|
70
|
+
stop: this._stop.bind(this),
|
|
71
|
+
onStop: this._onStop.bind(this),
|
|
72
|
+
started,
|
|
73
|
+
});
|
|
74
|
+
if ((0, isPromise_js_1.isPromise)(result)) {
|
|
75
|
+
result.catch((error) => this._stop(error));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
const stopped = this._stop(error);
|
|
80
|
+
if ((0, isPromise_js_1.isPromise)(stopped)) {
|
|
81
|
+
stopped.catch(() => undefined);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
subscribe(reducer = (generator) => Array.from(generator)) {
|
|
86
|
+
const generator = this._iteratorLoop(reducer);
|
|
87
|
+
return (0, withConcurrentAbruptClose_js_1.withConcurrentAbruptClose)(generator, () => this.cancel(), (error) => this.abort(error));
|
|
88
|
+
}
|
|
89
|
+
cancel() {
|
|
90
|
+
if (this._stopRequested) {
|
|
91
|
+
return this._stopCompletion;
|
|
92
|
+
}
|
|
93
|
+
return this._terminate(undefined, () => {
|
|
94
|
+
this._isStopped = true;
|
|
95
|
+
this._batchRequests.forEach((request) => request.resolve(undefined));
|
|
96
|
+
this._batchRequests.clear();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
abort(reason) {
|
|
100
|
+
if (this._stopRequested) {
|
|
101
|
+
return this._stopCompletion;
|
|
102
|
+
}
|
|
103
|
+
return this._terminate(reason, () => {
|
|
104
|
+
this._isStopped = true;
|
|
105
|
+
if (this._batchRequests.size) {
|
|
106
|
+
this._batchRequests.forEach((request) => request.reject(reason));
|
|
107
|
+
this._batchRequests.clear();
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// save rejection for later batch requests
|
|
111
|
+
this._entries.push({
|
|
112
|
+
kind: 'item',
|
|
113
|
+
settled: { status: 'rejected', reason },
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
async forEachBatch(reducer) {
|
|
118
|
+
const sub = this.subscribe(async (generator) => {
|
|
119
|
+
const { promise: drained, resolve } =
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
121
|
+
(0, promiseWithResolvers_js_1.promiseWithResolvers)();
|
|
122
|
+
const wrappedBatch = (function* wrapper() {
|
|
123
|
+
yield* generator;
|
|
124
|
+
resolve();
|
|
125
|
+
})();
|
|
126
|
+
await Promise.all([reducer(wrappedBatch), drained]);
|
|
127
|
+
});
|
|
128
|
+
for await (const _ of sub /* c8 ignore start */) {
|
|
129
|
+
// intentionally empty
|
|
130
|
+
} /* c8 ignore stop */
|
|
131
|
+
}
|
|
132
|
+
setCapacity(nextCapacity) {
|
|
133
|
+
this._capacity = this._normalizeCapacity(nextCapacity);
|
|
134
|
+
this._flush();
|
|
135
|
+
}
|
|
136
|
+
getCapacity() {
|
|
137
|
+
return this._capacity;
|
|
138
|
+
}
|
|
139
|
+
isStopped() {
|
|
140
|
+
return this._isStopped;
|
|
141
|
+
}
|
|
142
|
+
_normalizeCapacity(capacity) {
|
|
143
|
+
return Math.max(1, Math.floor(capacity));
|
|
144
|
+
}
|
|
145
|
+
_flush() {
|
|
146
|
+
while (this._waiters.length > 0 && this._backlog < this._capacity) {
|
|
147
|
+
this._waiters.shift()?.();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
_reserve() {
|
|
151
|
+
this._backlog += 1;
|
|
152
|
+
if (this._backlog < this._capacity) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
156
|
+
const { promise, resolve } = (0, promiseWithResolvers_js_1.promiseWithResolvers)();
|
|
157
|
+
this._waiters.push(resolve);
|
|
158
|
+
return promise;
|
|
159
|
+
}
|
|
160
|
+
_release() {
|
|
161
|
+
if (this._backlog > 0) {
|
|
162
|
+
this._backlog -= 1;
|
|
163
|
+
}
|
|
164
|
+
this._flush();
|
|
165
|
+
}
|
|
166
|
+
_onStop(cleanup) {
|
|
167
|
+
if (this._stopRequested) {
|
|
168
|
+
throw new Error('Cannot register onStop cleanup after stop has been requested.');
|
|
169
|
+
}
|
|
170
|
+
this._stopCleanupCallbacks.push(cleanup);
|
|
171
|
+
}
|
|
172
|
+
_runStopCleanup(reason, afterCleanup) {
|
|
173
|
+
this._stopRequested = true;
|
|
174
|
+
const cleanupPromises = this._stopCleanupCallbacks.flatMap((cleanupCallback) => {
|
|
175
|
+
try {
|
|
176
|
+
const result = cleanupCallback(reason);
|
|
177
|
+
return (0, isPromise_js_1.isPromise)(result) ? [result] : [];
|
|
178
|
+
} /* c8 ignore start */
|
|
179
|
+
catch {
|
|
180
|
+
// ignore errors
|
|
181
|
+
return [];
|
|
182
|
+
} /* c8 ignore stop */
|
|
183
|
+
});
|
|
184
|
+
const cleanup = cleanupPromises.length > 0
|
|
185
|
+
? Promise.allSettled(cleanupPromises).then(() => undefined)
|
|
186
|
+
: undefined;
|
|
187
|
+
if ((0, isPromise_js_1.isPromise)(cleanup)) {
|
|
188
|
+
this._stopCompletion = cleanup
|
|
189
|
+
.then(afterCleanup, afterCleanup)
|
|
190
|
+
.then(() => undefined);
|
|
191
|
+
return this._stopCompletion;
|
|
192
|
+
}
|
|
193
|
+
afterCleanup();
|
|
194
|
+
}
|
|
195
|
+
async *_iteratorLoop(reducer) {
|
|
196
|
+
this._resolveStarted();
|
|
197
|
+
let nextBatch;
|
|
198
|
+
// eslint-disable-next-line no-await-in-loop
|
|
199
|
+
while ((nextBatch = await this._waitForNextBatch())) {
|
|
200
|
+
let reduced = reducer(nextBatch);
|
|
201
|
+
if ((0, isPromise_js_1.isPromise)(reduced)) {
|
|
202
|
+
// eslint-disable-next-line no-await-in-loop
|
|
203
|
+
reduced = await reduced;
|
|
204
|
+
}
|
|
205
|
+
if (reduced === undefined) {
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
yield reduced;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
_waitForNextBatch() {
|
|
212
|
+
const { promise, resolve, reject } = (0, promiseWithResolvers_js_1.promiseWithResolvers)();
|
|
213
|
+
this._batchRequests.add({ resolve, reject });
|
|
214
|
+
this._deliverBatchIfReady();
|
|
215
|
+
return promise;
|
|
216
|
+
}
|
|
217
|
+
_push(item) {
|
|
218
|
+
if (this._stopRequested) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const maybePushPromise = this._reserve();
|
|
222
|
+
if ((0, isPromise_js_1.isPromise)(item)) {
|
|
223
|
+
const entry = { kind: 'item' };
|
|
224
|
+
this._entries.push(entry);
|
|
225
|
+
item.then((resolved) => {
|
|
226
|
+
entry.settled = { status: 'fulfilled', value: resolved };
|
|
227
|
+
this._deliverBatchIfReady();
|
|
228
|
+
}, (reason) => {
|
|
229
|
+
entry.settled = { status: 'rejected', reason };
|
|
230
|
+
this._deliverBatchIfReady();
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
this._entries.push({
|
|
235
|
+
kind: 'item',
|
|
236
|
+
settled: { status: 'fulfilled', value: item },
|
|
237
|
+
});
|
|
238
|
+
this._deliverBatchIfReady();
|
|
239
|
+
}
|
|
240
|
+
return maybePushPromise;
|
|
241
|
+
}
|
|
242
|
+
_terminate(reason, afterCleanup) {
|
|
243
|
+
for (const entry of this._entries) {
|
|
244
|
+
if (entry.kind === 'item') {
|
|
245
|
+
this._release();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
this._entries.length = 0;
|
|
249
|
+
return this._runStopCleanup(reason, afterCleanup);
|
|
250
|
+
}
|
|
251
|
+
_stop(reason) {
|
|
252
|
+
if (this._stopRequested) {
|
|
253
|
+
return this._stopCompletion;
|
|
254
|
+
}
|
|
255
|
+
const stopCompletion = this._runStopCleanup(reason, () => {
|
|
256
|
+
if (reason === undefined) {
|
|
257
|
+
if (this._entries.length === 0) {
|
|
258
|
+
this._isStopped = true;
|
|
259
|
+
this._deliverBatchIfReady();
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
this._entries.push({ kind: 'stop' });
|
|
263
|
+
this._deliverBatchIfReady();
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
this._entries.push({
|
|
267
|
+
kind: 'item',
|
|
268
|
+
settled: { status: 'rejected', reason },
|
|
269
|
+
});
|
|
270
|
+
this._entries.push({ kind: 'stop' });
|
|
271
|
+
this._deliverBatchIfReady();
|
|
272
|
+
});
|
|
273
|
+
if ((0, isPromise_js_1.isPromise)(stopCompletion)) {
|
|
274
|
+
stopCompletion.catch(() => undefined);
|
|
275
|
+
}
|
|
276
|
+
return stopCompletion;
|
|
277
|
+
}
|
|
278
|
+
_deliverBatchIfReady() {
|
|
279
|
+
if (!this._batchRequests.size) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const headEntry = this._entries[0];
|
|
283
|
+
const requests = this._batchRequests;
|
|
284
|
+
if (headEntry !== undefined) {
|
|
285
|
+
if (!(headEntry.kind !== 'stop'))
|
|
286
|
+
(0,
|
|
287
|
+
// stop sentinel always follows other work
|
|
288
|
+
invariant_js_1.invariant)(false);
|
|
289
|
+
const settled = headEntry.settled;
|
|
290
|
+
if (settled !== undefined) {
|
|
291
|
+
if (settled.status === 'fulfilled') {
|
|
292
|
+
this._batchRequests = new Set();
|
|
293
|
+
requests.forEach((request) => request.resolve(this._drainBatch()));
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
this._entries.shift();
|
|
297
|
+
this._release();
|
|
298
|
+
this._isStopped = true;
|
|
299
|
+
this._batchRequests = new Set();
|
|
300
|
+
requests.forEach((request) => request.reject(settled.reason));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
else if (this._isStopped) {
|
|
304
|
+
this._batchRequests = new Set();
|
|
305
|
+
requests.forEach((request) => request.resolve(undefined));
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
*_drainBatch() {
|
|
309
|
+
while (true) {
|
|
310
|
+
const entry = this._entries[0];
|
|
311
|
+
if (entry === undefined) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
if (entry.kind === 'stop') {
|
|
315
|
+
this._isStopped = true;
|
|
316
|
+
this._entries.shift();
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const settled = entry.settled;
|
|
320
|
+
if (settled === undefined || settled.status === 'rejected') {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
this._entries.shift();
|
|
324
|
+
this._release();
|
|
325
|
+
yield settled.value;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
exports.Queue = Queue;
|
|
330
|
+
//# sourceMappingURL=Queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Queue.js","sourceRoot":"","sources":["../../../src/execution/incremental/Queue.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AACvD,6DAAuD;AAEvD,mFAA6E;AAE7E,kFAA4E;AA6B5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAa,KAAK;IAehB,YACE,QAKmD,EACnD,eAAe,GAAG,CAAC;QApBb,aAAQ,GAAG,CAAC,CAAC;QACb,aAAQ,GAAsB,EAAE,CAAC;Q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AK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAO;YACT,CAAC;YACD,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;gBACtB,OAAO;YACT,CAAC;YACD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;YAC9B,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;gBAC3D,OAAO;YACT,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,MAAM,OAAO,CAAC,KAAK,CAAC;QACtB,CAAC;IACH,CAAC;CACF;AAzVD,sBAyVC","sourcesContent":["import { invariant } from '../../jsutils/invariant.js';\nimport { isPromise } from '../../jsutils/isPromise.js';\nimport type { PromiseOrValue } from '../../jsutils/PromiseOrValue.js';\nimport { promiseWithResolvers } from '../../jsutils/promiseWithResolvers.js';\n\nimport { withConcurrentAbruptClose } from '../withConcurrentAbruptClose.js';\n\ntype Settled<T> =\n | { status: 'fulfilled'; value: T }\n | { status: 'rejected'; reason: unknown };\n\ninterface ItemEntry<T> {\n kind: 'item';\n settled?: Settled<T>;\n}\n\ninterface StopEntry {\n kind: 'stop';\n}\n\ntype Entry<T> = ItemEntry<T> | StopEntry;\n\ninterface BatchRequest<T> {\n resolve: (generator: Generator<T> | undefined) => void;\n reject: (reason: unknown) => void;\n}\n\ninterface QueueExecutorOptions<T> {\n push: (item: PromiseOrValue<T>) => PromiseOrValue<void>;\n stop: (reason?: unknown) => PromiseOrValue<void>;\n onStop: (cleanup: (reason?: unknown) => PromiseOrValue<void>) => void;\n started: Promise<void>;\n}\n\n/**\n * A Queue is a lightweight async-generator primitive inspired by Brian Kim's\n * Repeater (https://repeater.js.org, https://github.com/repeaterjs/repeater).\n * The ergonomics are similar, but this implementation favors clarity over\n * performance and gives producers flexibility to remain lazy, become eager, or\n * live somewhere in between.\n *\n * The constructor takes an executor function and an optional `initialCapacity`.\n * Executors receive `{ push, stop, onStop, started }` and may return `void` or\n * a promise if they perform asynchronous setup. They call `push` whenever\n * another item is ready, call `stop` when no more values will be produced\n * (optionally supplying an error), register stop-time cleanup via `onStop`,\n * and await `started` when setup should run only after iteration begins.\n * Because `push`, `stop`, and `onStop` are plain functions, executors can\n * hoist them into outside scopes or pass them to helpers. If the executor\n * throws or its returned promise rejects, the queue treats it as `stop(error)`\n * and propagates the failure.\n *\n * The `initialCapacity` argument (default `1`) governs backpressure. Capacity\n * is the maximum number of buffered items allowed before a push must wait.\n * When the backlog reaches capacity, `push` returns a promise that settles\n * once consumption releases space; otherwise it returns `undefined`. Setting\n * capacity to `1` yields a fully lazy queue (every push waits unless a prior\n * item has been consumed); higher capacities buffer that many items eagerly.\n * Capacity can be changed later via `setCapacity` and observed via\n * `getCapacity`.\n *\n * `subscribe(reducer)` returns an async generator whose batches feed a generator\n * of settled values into the reducer; whatever the reducer returns (other than\n * `undefined`) becomes the yielded value for that batch. Calling `return()` on\n * the subscription settles pending `next` calls thanks to `withConcurrent`,\n * providing direct abort semantics rather than leaving `next()` suspended.\n *\n * 'forEachBatch(reducer)` is a convenience method that subscribes with the\n * given reducer and runs it for each batch until the queue stops.\n *\n * Producers can stay lazy by awaiting `started`, using zero capacity, and\n * awaiting each `push`. Skipping those waits while raising capacity makes the\n * queue eager up to its configured limit. The `isStopped()` helper exposes\n * whether the queue has fully stopped, which can be useful when the reducer\n * function actually performs external work and wants to bail early without\n * awaiting another `next`.\n *\n * @internal\n */\nexport class Queue<T> {\n private _capacity: number;\n private _backlog = 0;\n private _waiters: Array<() => void> = [];\n private _entries: Array<Entry<T>> = [];\n private _isStopped = false;\n private _stopRequested = false;\n private _stopCleanupCallbacks: Array<\n (reason?: unknown) => PromiseOrValue<void>\n > = [];\n private _stopCompletion: Promise<void> | undefined;\n private _batchRequests = new Set<BatchRequest<T>>();\n\n private _resolveStarted: () => void;\n\n constructor(\n executor: ({\n push,\n stop,\n onStop,\n started,\n }: QueueExecutorOptions<T>) => PromiseOrValue<void>,\n initialCapacity = 1,\n ) {\n this._capacity = this._normalizeCapacity(initialCapacity);\n\n const { promise: started, resolve: resolveStarted } =\n // eslint-disable-next-line @typescript-eslint/no-invalid-void-type\n promiseWithResolvers<void>();\n\n this._resolveStarted = resolveStarted;\n\n try {\n const result = executor({\n push: this._push.bind(this),\n stop: this._stop.bind(this),\n onStop: this._onStop.bind(this),\n started,\n });\n if (isPromise(result)) {\n result.catch((error: unknown) => this._stop(error));\n }\n } catch (error) {\n const stopped = this._stop(error);\n if (isPromise(stopped)) {\n stopped.catch(() => undefined);\n }\n }\n }\n\n subscribe<U>(\n reducer: (\n generator: Generator<T, void, void>,\n ) => PromiseOrValue<U | undefined> = (generator) =>\n Array.from(generator) as U,\n ): AsyncGenerator<U, void, void> {\n const generator = this._iteratorLoop(reducer);\n return withConcurrentAbruptClose(\n generator,\n () => this.cancel(),\n (error) => this.abort(error),\n );\n }\n\n cancel(): PromiseOrValue<void> {\n if (this._stopRequested) {\n return this._stopCompletion;\n }\n return this._terminate(undefined, () => {\n this._isStopped = true;\n this._batchRequests.forEach((request) => request.resolve(undefined));\n this._batchRequests.clear();\n });\n }\n\n abort(reason?: unknown): PromiseOrValue<void> {\n if (this._stopRequested) {\n return this._stopCompletion;\n }\n return this._terminate(reason, () => {\n this._isStopped = true;\n if (this._batchRequests.size) {\n this._batchRequests.forEach((request) => request.reject(reason));\n this._batchRequests.clear();\n return;\n }\n // save rejection for later batch requests\n this._entries.push({\n kind: 'item',\n settled: { status: 'rejected', reason },\n });\n });\n }\n\n async forEachBatch(\n reducer: (generator: Generator<T, void, void>) => PromiseOrValue<void>,\n ): Promise<void> {\n const sub = this.subscribe(async (generator) => {\n const { promise: drained, resolve } =\n // eslint-disable-next-line @typescript-eslint/no-invalid-void-type\n promiseWithResolvers<void>();\n\n const wrappedBatch = (function* wrapper(): Generator<T> {\n yield* generator;\n resolve();\n })();\n\n await Promise.all([reducer(wrappedBatch), drained]);\n });\n\n for await (const _ of sub /* c8 ignore start */) {\n // intentionally empty\n } /* c8 ignore stop */\n }\n\n setCapacity(nextCapacity: number): void {\n this._capacity = this._normalizeCapacity(nextCapacity);\n this._flush();\n }\n\n getCapacity(): number {\n return this._capacity;\n }\n\n isStopped(): boolean {\n return this._isStopped;\n }\n\n private _normalizeCapacity(capacity: number): number {\n return Math.max(1, Math.floor(capacity));\n }\n\n private _flush(): void {\n while (this._waiters.length > 0 && this._backlog < this._capacity) {\n this._waiters.shift()?.();\n }\n }\n\n private _reserve(): PromiseOrValue<void> {\n this._backlog += 1;\n if (this._backlog < this._capacity) {\n return undefined;\n }\n // eslint-disable-next-line @typescript-eslint/no-invalid-void-type\n const { promise, resolve } = promiseWithResolvers<void>();\n this._waiters.push(resolve);\n return promise;\n }\n\n private _release(): void {\n if (this._backlog > 0) {\n this._backlog -= 1;\n }\n this._flush();\n }\n\n private _onStop(cleanup: (reason?: unknown) => PromiseOrValue<void>): void {\n if (this._stopRequested) {\n throw new Error(\n 'Cannot register onStop cleanup after stop has been requested.',\n );\n }\n this._stopCleanupCallbacks.push(cleanup);\n }\n\n private _runStopCleanup(\n reason: unknown,\n afterCleanup: () => void,\n ): PromiseOrValue<void> {\n this._stopRequested = true;\n const cleanupPromises = this._stopCleanupCallbacks.flatMap(\n (cleanupCallback): Array<Promise<unknown>> => {\n try {\n const result = cleanupCallback(reason);\n return isPromise(result) ? [result] : [];\n } /* c8 ignore start */ catch {\n // ignore errors\n return [];\n } /* c8 ignore stop */\n },\n );\n const cleanup =\n cleanupPromises.length > 0\n ? Promise.allSettled(cleanupPromises).then(() => undefined)\n : undefined;\n if (isPromise(cleanup)) {\n this._stopCompletion = cleanup\n .then(afterCleanup, afterCleanup)\n .then(() => undefined);\n return this._stopCompletion;\n }\n afterCleanup();\n }\n\n private async *_iteratorLoop<U>(\n reducer: (\n generator: Generator<T, void, void>,\n ) => PromiseOrValue<U | undefined>,\n ): AsyncGenerator<U, void, void> {\n this._resolveStarted();\n let nextBatch: Generator<T> | undefined;\n // eslint-disable-next-line no-await-in-loop\n while ((nextBatch = await this._waitForNextBatch())) {\n let reduced = reducer(nextBatch);\n if (isPromise(reduced)) {\n // eslint-disable-next-line no-await-in-loop\n reduced = await reduced;\n }\n if (reduced === undefined) {\n continue;\n }\n yield reduced;\n }\n }\n\n private _waitForNextBatch(): Promise<Generator<T> | undefined> {\n const { promise, resolve, reject } = promiseWithResolvers<\n Generator<T> | undefined\n >();\n this._batchRequests.add({ resolve, reject });\n this._deliverBatchIfReady();\n return promise;\n }\n\n private _push(item: PromiseOrValue<T>): PromiseOrValue<void> {\n if (this._stopRequested) {\n return;\n }\n const maybePushPromise = this._reserve();\n if (isPromise(item)) {\n const entry: ItemEntry<T> = { kind: 'item' };\n this._entries.push(entry);\n item.then(\n (resolved) => {\n entry.settled = { status: 'fulfilled', value: resolved };\n this._deliverBatchIfReady();\n },\n (reason: unknown) => {\n entry.settled = { status: 'rejected', reason };\n this._deliverBatchIfReady();\n },\n );\n } else {\n this._entries.push({\n kind: 'item',\n settled: { status: 'fulfilled', value: item },\n });\n this._deliverBatchIfReady();\n }\n return maybePushPromise;\n }\n\n private _terminate(\n reason: unknown,\n afterCleanup: () => void,\n ): PromiseOrValue<void> {\n for (const entry of this._entries) {\n if (entry.kind === 'item') {\n this._release();\n }\n }\n this._entries.length = 0;\n return this._runStopCleanup(reason, afterCleanup);\n }\n\n private _stop(reason?: unknown): PromiseOrValue<void> {\n if (this._stopRequested) {\n return this._stopCompletion;\n }\n const stopCompletion = this._runStopCleanup(reason, () => {\n if (reason === undefined) {\n if (this._entries.length === 0) {\n this._isStopped = true;\n this._deliverBatchIfReady();\n return;\n }\n\n this._entries.push({ kind: 'stop' });\n this._deliverBatchIfReady();\n return;\n }\n\n this._entries.push({\n kind: 'item',\n settled: { status: 'rejected', reason },\n });\n this._entries.push({ kind: 'stop' });\n this._deliverBatchIfReady();\n });\n\n if (isPromise(stopCompletion)) {\n stopCompletion.catch(() => undefined);\n }\n return stopCompletion;\n }\n\n private _deliverBatchIfReady(): void {\n if (!this._batchRequests.size) {\n return;\n }\n const headEntry = this._entries[0];\n const requests = this._batchRequests;\n if (headEntry !== undefined) {\n // stop sentinel always follows other work\n invariant(headEntry.kind !== 'stop');\n\n const settled = headEntry.settled;\n if (settled !== undefined) {\n if (settled.status === 'fulfilled') {\n this._batchRequests = new Set();\n requests.forEach((request) => request.resolve(this._drainBatch()));\n return;\n }\n this._entries.shift();\n this._release();\n this._isStopped = true;\n this._batchRequests = new Set();\n requests.forEach((request) => request.reject(settled.reason));\n }\n } else if (this._isStopped) {\n this._batchRequests = new Set();\n requests.forEach((request) => request.resolve(undefined));\n }\n }\n\n private *_drainBatch(): Generator<T> {\n while (true) {\n const entry = this._entries[0];\n if (entry === undefined) {\n return;\n }\n if (entry.kind === 'stop') {\n this._isStopped = true;\n this._entries.shift();\n return;\n }\n const settled = entry.settled;\n if (settled === undefined || settled.status === 'rejected') {\n return;\n }\n this._entries.shift();\n this._release();\n yield settled.value;\n }\n }\n}\n"]}
|