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,43 @@
|
|
|
1
|
+
import { Token } from './ast.js';
|
|
2
|
+
import type { LexerInterface } from './lexer.js';
|
|
3
|
+
import type { Source } from './source.js';
|
|
4
|
+
/**
|
|
5
|
+
* Given a Source schema coordinate, creates a Lexer for that source.
|
|
6
|
+
* A SchemaCoordinateLexer is a stateful stream generator in that every time
|
|
7
|
+
* it is advanced, it returns the next token in the Source. Assuming the
|
|
8
|
+
* source lexes, the final Token emitted by the lexer will be of kind
|
|
9
|
+
* EOF, after which the lexer will repeatedly return the same EOF token
|
|
10
|
+
* whenever called.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SchemaCoordinateLexer implements LexerInterface {
|
|
13
|
+
source: Source;
|
|
14
|
+
/**
|
|
15
|
+
* The previously focused non-ignored token.
|
|
16
|
+
*/
|
|
17
|
+
lastToken: Token;
|
|
18
|
+
/**
|
|
19
|
+
* The currently focused non-ignored token.
|
|
20
|
+
*/
|
|
21
|
+
token: Token;
|
|
22
|
+
/**
|
|
23
|
+
* The (1-indexed) line containing the current token.
|
|
24
|
+
* Since a schema coordinate may not contain newline, this value is always 1.
|
|
25
|
+
*/
|
|
26
|
+
line: 1;
|
|
27
|
+
/**
|
|
28
|
+
* The character offset at which the current line begins.
|
|
29
|
+
* Since a schema coordinate may not contain newline, this value is always 0.
|
|
30
|
+
*/
|
|
31
|
+
lineStart: 0;
|
|
32
|
+
constructor(source: Source);
|
|
33
|
+
get [Symbol.toStringTag](): string;
|
|
34
|
+
/**
|
|
35
|
+
* Advances the token stream to the next non-ignored token.
|
|
36
|
+
*/
|
|
37
|
+
advance(): Token;
|
|
38
|
+
/**
|
|
39
|
+
* Looks ahead and returns the next non-ignored token, but does not change
|
|
40
|
+
* the current Lexer token.
|
|
41
|
+
*/
|
|
42
|
+
lookahead(): Token;
|
|
43
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaCoordinateLexer = void 0;
|
|
4
|
+
const syntaxError_js_1 = require("../error/syntaxError.js");
|
|
5
|
+
const ast_js_1 = require("./ast.js");
|
|
6
|
+
const characterClasses_js_1 = require("./characterClasses.js");
|
|
7
|
+
const lexer_js_1 = require("./lexer.js");
|
|
8
|
+
const tokenKind_js_1 = require("./tokenKind.js");
|
|
9
|
+
/**
|
|
10
|
+
* Given a Source schema coordinate, creates a Lexer for that source.
|
|
11
|
+
* A SchemaCoordinateLexer is a stateful stream generator in that every time
|
|
12
|
+
* it is advanced, it returns the next token in the Source. Assuming the
|
|
13
|
+
* source lexes, the final Token emitted by the lexer will be of kind
|
|
14
|
+
* EOF, after which the lexer will repeatedly return the same EOF token
|
|
15
|
+
* whenever called.
|
|
16
|
+
*/
|
|
17
|
+
class SchemaCoordinateLexer {
|
|
18
|
+
constructor(source) {
|
|
19
|
+
/**
|
|
20
|
+
* The (1-indexed) line containing the current token.
|
|
21
|
+
* Since a schema coordinate may not contain newline, this value is always 1.
|
|
22
|
+
*/
|
|
23
|
+
this.line = 1;
|
|
24
|
+
/**
|
|
25
|
+
* The character offset at which the current line begins.
|
|
26
|
+
* Since a schema coordinate may not contain newline, this value is always 0.
|
|
27
|
+
*/
|
|
28
|
+
this.lineStart = 0;
|
|
29
|
+
const startOfFileToken = new ast_js_1.Token(tokenKind_js_1.TokenKind.SOF, 0, 0, 0, 0);
|
|
30
|
+
this.source = source;
|
|
31
|
+
this.lastToken = startOfFileToken;
|
|
32
|
+
this.token = startOfFileToken;
|
|
33
|
+
}
|
|
34
|
+
get [Symbol.toStringTag]() {
|
|
35
|
+
return 'SchemaCoordinateLexer';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Advances the token stream to the next non-ignored token.
|
|
39
|
+
*/
|
|
40
|
+
advance() {
|
|
41
|
+
this.lastToken = this.token;
|
|
42
|
+
const token = (this.token = this.lookahead());
|
|
43
|
+
return token;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Looks ahead and returns the next non-ignored token, but does not change
|
|
47
|
+
* the current Lexer token.
|
|
48
|
+
*/
|
|
49
|
+
lookahead() {
|
|
50
|
+
let token = this.token;
|
|
51
|
+
if (token.kind !== tokenKind_js_1.TokenKind.EOF) {
|
|
52
|
+
// Read the next token and form a link in the token linked-list.
|
|
53
|
+
const nextToken = readNextToken(this, token.end);
|
|
54
|
+
// @ts-expect-error next is only mutable during parsing.
|
|
55
|
+
token.next = nextToken;
|
|
56
|
+
// @ts-expect-error prev is only mutable during parsing.
|
|
57
|
+
nextToken.prev = token;
|
|
58
|
+
token = nextToken;
|
|
59
|
+
}
|
|
60
|
+
return token;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.SchemaCoordinateLexer = SchemaCoordinateLexer;
|
|
64
|
+
/**
|
|
65
|
+
* Gets the next token from the source starting at the given position.
|
|
66
|
+
*/
|
|
67
|
+
function readNextToken(lexer, start) {
|
|
68
|
+
const body = lexer.source.body;
|
|
69
|
+
const bodyLength = body.length;
|
|
70
|
+
const position = start;
|
|
71
|
+
if (position < bodyLength) {
|
|
72
|
+
const code = body.charCodeAt(position);
|
|
73
|
+
switch (code) {
|
|
74
|
+
case 0x002e: // .
|
|
75
|
+
return (0, lexer_js_1.createToken)(lexer, tokenKind_js_1.TokenKind.DOT, position, position + 1);
|
|
76
|
+
case 0x0028: // (
|
|
77
|
+
return (0, lexer_js_1.createToken)(lexer, tokenKind_js_1.TokenKind.PAREN_L, position, position + 1);
|
|
78
|
+
case 0x0029: // )
|
|
79
|
+
return (0, lexer_js_1.createToken)(lexer, tokenKind_js_1.TokenKind.PAREN_R, position, position + 1);
|
|
80
|
+
case 0x003a: // :
|
|
81
|
+
return (0, lexer_js_1.createToken)(lexer, tokenKind_js_1.TokenKind.COLON, position, position + 1);
|
|
82
|
+
case 0x0040: // @
|
|
83
|
+
return (0, lexer_js_1.createToken)(lexer, tokenKind_js_1.TokenKind.AT, position, position + 1);
|
|
84
|
+
}
|
|
85
|
+
// Name
|
|
86
|
+
if ((0, characterClasses_js_1.isNameStart)(code)) {
|
|
87
|
+
return (0, lexer_js_1.readName)(lexer, position);
|
|
88
|
+
}
|
|
89
|
+
throw (0, syntaxError_js_1.syntaxError)(lexer.source, position, `Invalid character: ${(0, lexer_js_1.printCodePointAt)(lexer, position)}.`);
|
|
90
|
+
}
|
|
91
|
+
return (0, lexer_js_1.createToken)(lexer, tokenKind_js_1.TokenKind.EOF, bodyLength, bodyLength);
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=schemaCoordinateLexer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaCoordinateLexer.js","sourceRoot":"","sources":["../../src/language/schemaCoordinateLexer.ts"],"names":[],"mappings":"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","sourcesContent":["import { syntaxError } from '../error/syntaxError.js';\n\nimport { Token } from './ast.js';\nimport { isNameStart } from './characterClasses.js';\nimport type { LexerInterface } from './lexer.js';\nimport { createToken, printCodePointAt, readName } from './lexer.js';\nimport type { Source } from './source.js';\nimport { TokenKind } from './tokenKind.js';\n\n/**\n * Given a Source schema coordinate, creates a Lexer for that source.\n * A SchemaCoordinateLexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\nexport class SchemaCoordinateLexer implements LexerInterface {\n source: Source;\n\n /**\n * The previously focused non-ignored token.\n */\n lastToken: Token;\n\n /**\n * The currently focused non-ignored token.\n */\n token: Token;\n\n /**\n * The (1-indexed) line containing the current token.\n * Since a schema coordinate may not contain newline, this value is always 1.\n */\n line: 1 = 1 as const;\n\n /**\n * The character offset at which the current line begins.\n * Since a schema coordinate may not contain newline, this value is always 0.\n */\n lineStart: 0 = 0 as const;\n\n constructor(source: Source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n }\n\n get [Symbol.toStringTag](): string {\n return 'SchemaCoordinateLexer';\n }\n\n /**\n * Advances the token stream to the next non-ignored token.\n */\n advance(): Token {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the current Lexer token.\n */\n lookahead(): Token {\n let token = this.token;\n if (token.kind !== TokenKind.EOF) {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end);\n // @ts-expect-error next is only mutable during parsing.\n token.next = nextToken;\n // @ts-expect-error prev is only mutable during parsing.\n nextToken.prev = token;\n token = nextToken;\n }\n return token;\n }\n}\n\n/**\n * Gets the next token from the source starting at the given position.\n */\nfunction readNextToken(lexer: SchemaCoordinateLexer, start: number): Token {\n const body = lexer.source.body;\n const bodyLength = body.length;\n const position = start;\n\n if (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n switch (code) {\n case 0x002e: // .\n return createToken(lexer, TokenKind.DOT, position, position + 1);\n case 0x0028: // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n case 0x0029: // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n case 0x003a: // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n case 0x0040: // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n }\n\n // Name\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n"]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { syntaxError } from "../error/syntaxError.mjs";
|
|
2
|
+
import { Token } from "./ast.mjs";
|
|
3
|
+
import { isNameStart } from "./characterClasses.mjs";
|
|
4
|
+
import { createToken, printCodePointAt, readName } from "./lexer.mjs";
|
|
5
|
+
import { TokenKind } from "./tokenKind.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Given a Source schema coordinate, creates a Lexer for that source.
|
|
8
|
+
* A SchemaCoordinateLexer is a stateful stream generator in that every time
|
|
9
|
+
* it is advanced, it returns the next token in the Source. Assuming the
|
|
10
|
+
* source lexes, the final Token emitted by the lexer will be of kind
|
|
11
|
+
* EOF, after which the lexer will repeatedly return the same EOF token
|
|
12
|
+
* whenever called.
|
|
13
|
+
*/
|
|
14
|
+
export class SchemaCoordinateLexer {
|
|
15
|
+
constructor(source) {
|
|
16
|
+
/**
|
|
17
|
+
* The (1-indexed) line containing the current token.
|
|
18
|
+
* Since a schema coordinate may not contain newline, this value is always 1.
|
|
19
|
+
*/
|
|
20
|
+
this.line = 1;
|
|
21
|
+
/**
|
|
22
|
+
* The character offset at which the current line begins.
|
|
23
|
+
* Since a schema coordinate may not contain newline, this value is always 0.
|
|
24
|
+
*/
|
|
25
|
+
this.lineStart = 0;
|
|
26
|
+
const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);
|
|
27
|
+
this.source = source;
|
|
28
|
+
this.lastToken = startOfFileToken;
|
|
29
|
+
this.token = startOfFileToken;
|
|
30
|
+
}
|
|
31
|
+
get [Symbol.toStringTag]() {
|
|
32
|
+
return 'SchemaCoordinateLexer';
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Advances the token stream to the next non-ignored token.
|
|
36
|
+
*/
|
|
37
|
+
advance() {
|
|
38
|
+
this.lastToken = this.token;
|
|
39
|
+
const token = (this.token = this.lookahead());
|
|
40
|
+
return token;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Looks ahead and returns the next non-ignored token, but does not change
|
|
44
|
+
* the current Lexer token.
|
|
45
|
+
*/
|
|
46
|
+
lookahead() {
|
|
47
|
+
let token = this.token;
|
|
48
|
+
if (token.kind !== TokenKind.EOF) {
|
|
49
|
+
// Read the next token and form a link in the token linked-list.
|
|
50
|
+
const nextToken = readNextToken(this, token.end);
|
|
51
|
+
// @ts-expect-error next is only mutable during parsing.
|
|
52
|
+
token.next = nextToken;
|
|
53
|
+
// @ts-expect-error prev is only mutable during parsing.
|
|
54
|
+
nextToken.prev = token;
|
|
55
|
+
token = nextToken;
|
|
56
|
+
}
|
|
57
|
+
return token;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Gets the next token from the source starting at the given position.
|
|
62
|
+
*/
|
|
63
|
+
function readNextToken(lexer, start) {
|
|
64
|
+
const body = lexer.source.body;
|
|
65
|
+
const bodyLength = body.length;
|
|
66
|
+
const position = start;
|
|
67
|
+
if (position < bodyLength) {
|
|
68
|
+
const code = body.charCodeAt(position);
|
|
69
|
+
switch (code) {
|
|
70
|
+
case 0x002e: // .
|
|
71
|
+
return createToken(lexer, TokenKind.DOT, position, position + 1);
|
|
72
|
+
case 0x0028: // (
|
|
73
|
+
return createToken(lexer, TokenKind.PAREN_L, position, position + 1);
|
|
74
|
+
case 0x0029: // )
|
|
75
|
+
return createToken(lexer, TokenKind.PAREN_R, position, position + 1);
|
|
76
|
+
case 0x003a: // :
|
|
77
|
+
return createToken(lexer, TokenKind.COLON, position, position + 1);
|
|
78
|
+
case 0x0040: // @
|
|
79
|
+
return createToken(lexer, TokenKind.AT, position, position + 1);
|
|
80
|
+
}
|
|
81
|
+
// Name
|
|
82
|
+
if (isNameStart(code)) {
|
|
83
|
+
return readName(lexer, position);
|
|
84
|
+
}
|
|
85
|
+
throw syntaxError(lexer.source, position, `Invalid character: ${printCodePointAt(lexer, position)}.`);
|
|
86
|
+
}
|
|
87
|
+
return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=schemaCoordinateLexer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaCoordinateLexer.js","sourceRoot":"","sources":["../../src/language/schemaCoordinateLexer.ts"],"names":[],"mappings":"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","sourcesContent":["import { syntaxError } from '../error/syntaxError.js';\n\nimport { Token } from './ast.js';\nimport { isNameStart } from './characterClasses.js';\nimport type { LexerInterface } from './lexer.js';\nimport { createToken, printCodePointAt, readName } from './lexer.js';\nimport type { Source } from './source.js';\nimport { TokenKind } from './tokenKind.js';\n\n/**\n * Given a Source schema coordinate, creates a Lexer for that source.\n * A SchemaCoordinateLexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\nexport class SchemaCoordinateLexer implements LexerInterface {\n source: Source;\n\n /**\n * The previously focused non-ignored token.\n */\n lastToken: Token;\n\n /**\n * The currently focused non-ignored token.\n */\n token: Token;\n\n /**\n * The (1-indexed) line containing the current token.\n * Since a schema coordinate may not contain newline, this value is always 1.\n */\n line: 1 = 1 as const;\n\n /**\n * The character offset at which the current line begins.\n * Since a schema coordinate may not contain newline, this value is always 0.\n */\n lineStart: 0 = 0 as const;\n\n constructor(source: Source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n }\n\n get [Symbol.toStringTag](): string {\n return 'SchemaCoordinateLexer';\n }\n\n /**\n * Advances the token stream to the next non-ignored token.\n */\n advance(): Token {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the current Lexer token.\n */\n lookahead(): Token {\n let token = this.token;\n if (token.kind !== TokenKind.EOF) {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end);\n // @ts-expect-error next is only mutable during parsing.\n token.next = nextToken;\n // @ts-expect-error prev is only mutable during parsing.\n nextToken.prev = token;\n token = nextToken;\n }\n return token;\n }\n}\n\n/**\n * Gets the next token from the source starting at the given position.\n */\nfunction readNextToken(lexer: SchemaCoordinateLexer, start: number): Token {\n const body = lexer.source.body;\n const bodyLength = body.length;\n const position = start;\n\n if (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n switch (code) {\n case 0x002e: // .\n return createToken(lexer, TokenKind.DOT, position, position + 1);\n case 0x0028: // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n case 0x0029: // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n case 0x003a: // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n case 0x0040: // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n }\n\n // Name\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface Location {
|
|
2
|
+
line: number;
|
|
3
|
+
column: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
|
|
7
|
+
* optional, but they are useful for clients who store GraphQL documents in source files.
|
|
8
|
+
* For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might
|
|
9
|
+
* be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`.
|
|
10
|
+
* The `line` and `column` properties in `locationOffset` are 1-indexed.
|
|
11
|
+
*/
|
|
12
|
+
export declare class Source {
|
|
13
|
+
readonly __kind: symbol;
|
|
14
|
+
body: string;
|
|
15
|
+
name: string;
|
|
16
|
+
locationOffset: Location;
|
|
17
|
+
constructor(body: string, name?: string, locationOffset?: Location);
|
|
18
|
+
get [Symbol.toStringTag](): string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Test if the given value is a Source object.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function isSource(source: unknown): source is Source;
|
|
26
|
+
export {};
|
package/language/source.d.ts
CHANGED
package/language/source.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.Source = void 0;
|
|
|
4
4
|
exports.isSource = isSource;
|
|
5
5
|
const devAssert_js_1 = require("../jsutils/devAssert.js");
|
|
6
6
|
const instanceOf_js_1 = require("../jsutils/instanceOf.js");
|
|
7
|
+
const sourceSymbol = Symbol('Source');
|
|
7
8
|
/**
|
|
8
9
|
* A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
|
|
9
10
|
* optional, but they are useful for clients who store GraphQL documents in source files.
|
|
@@ -13,11 +14,14 @@ const instanceOf_js_1 = require("../jsutils/instanceOf.js");
|
|
|
13
14
|
*/
|
|
14
15
|
class Source {
|
|
15
16
|
constructor(body, name = 'GraphQL request', locationOffset = { line: 1, column: 1 }) {
|
|
17
|
+
this.__kind = sourceSymbol;
|
|
16
18
|
this.body = body;
|
|
17
19
|
this.name = name;
|
|
18
20
|
this.locationOffset = locationOffset;
|
|
19
|
-
(this.locationOffset.line > 0)
|
|
20
|
-
|
|
21
|
+
if (!(this.locationOffset.line > 0))
|
|
22
|
+
(0, devAssert_js_1.devAssert)(false, 'line in locationOffset is 1-indexed and must be positive.');
|
|
23
|
+
if (!(this.locationOffset.column > 0))
|
|
24
|
+
(0, devAssert_js_1.devAssert)(false, 'column in locationOffset is 1-indexed and must be positive.');
|
|
21
25
|
}
|
|
22
26
|
get [Symbol.toStringTag]() {
|
|
23
27
|
return 'Source';
|
|
@@ -30,6 +34,6 @@ exports.Source = Source;
|
|
|
30
34
|
* @internal
|
|
31
35
|
*/
|
|
32
36
|
function isSource(source) {
|
|
33
|
-
return (0, instanceOf_js_1.instanceOf)(source, Source);
|
|
37
|
+
return (0, instanceOf_js_1.instanceOf)(source, sourceSymbol, Source);
|
|
34
38
|
}
|
|
35
39
|
//# sourceMappingURL=source.js.map
|
package/language/source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/language/source.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/language/source.ts"],"names":[],"mappings":";;;AAqDA,4BAEC;AAvDD,0DAAoD;AACpD,4DAAsD;AAOtD,MAAM,YAAY,GAAkB,MAAM,CAAC,QAAQ,CAAC,CAAC;AAErD;;;;;;GAMG;AACH,MAAa,MAAM;IAOjB,YACE,IAAY,EACZ,OAAe,iBAAiB,EAChC,iBAA2B,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QAEjD,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;cAEnC,IAAI,CAAC,cAAc,CAAC,IAAI,GAAG,CAAC;gBAD9B,wBAAS,SAEP,2DAA2D;cAG3D,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;gBADhC,wBAAS,SAEP,6DAA6D;IAEjE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA7BD,wBA6BC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,MAAe;IACtC,OAAO,IAAA,0BAAU,EAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import { devAssert } from '../jsutils/devAssert.js';\nimport { instanceOf } from '../jsutils/instanceOf.js';\n\ninterface Location {\n line: number;\n column: number;\n}\n\nconst sourceSymbol: unique symbol = Symbol('Source');\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n readonly __kind: symbol;\n\n body: string;\n name: string;\n locationOffset: Location;\n\n constructor(\n body: string,\n name: string = 'GraphQL request',\n locationOffset: Location = { line: 1, column: 1 },\n ) {\n this.__kind = sourceSymbol;\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n devAssert(\n this.locationOffset.line > 0,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n devAssert(\n this.locationOffset.column > 0,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag](): string {\n return 'Source';\n }\n}\n\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\nexport function isSource(source: unknown): source is Source {\n return instanceOf(source, sourceSymbol, Source);\n}\n"]}
|
package/language/source.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { devAssert } from "../jsutils/devAssert.mjs";
|
|
2
2
|
import { instanceOf } from "../jsutils/instanceOf.mjs";
|
|
3
|
+
const sourceSymbol = Symbol('Source');
|
|
3
4
|
/**
|
|
4
5
|
* A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
|
|
5
6
|
* optional, but they are useful for clients who store GraphQL documents in source files.
|
|
@@ -9,11 +10,14 @@ import { instanceOf } from "../jsutils/instanceOf.mjs";
|
|
|
9
10
|
*/
|
|
10
11
|
export class Source {
|
|
11
12
|
constructor(body, name = 'GraphQL request', locationOffset = { line: 1, column: 1 }) {
|
|
13
|
+
this.__kind = sourceSymbol;
|
|
12
14
|
this.body = body;
|
|
13
15
|
this.name = name;
|
|
14
16
|
this.locationOffset = locationOffset;
|
|
15
|
-
(this.locationOffset.line > 0)
|
|
16
|
-
|
|
17
|
+
if (!(this.locationOffset.line > 0))
|
|
18
|
+
devAssert(false, 'line in locationOffset is 1-indexed and must be positive.');
|
|
19
|
+
if (!(this.locationOffset.column > 0))
|
|
20
|
+
devAssert(false, 'column in locationOffset is 1-indexed and must be positive.');
|
|
17
21
|
}
|
|
18
22
|
get [Symbol.toStringTag]() {
|
|
19
23
|
return 'Source';
|
|
@@ -25,6 +29,6 @@ export class Source {
|
|
|
25
29
|
* @internal
|
|
26
30
|
*/
|
|
27
31
|
export function isSource(source) {
|
|
28
|
-
return instanceOf(source, Source);
|
|
32
|
+
return instanceOf(source, sourceSymbol, Source);
|
|
29
33
|
}
|
|
30
34
|
//# sourceMappingURL=source.js.map
|
package/language/source.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/language/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iCAAgC;AACpD,OAAO,EAAE,UAAU,EAAE,kCAAiC;AAOtD;;;;;;GAMG;AACH,MAAM,OAAO,MAAM;
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/language/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iCAAgC;AACpD,OAAO,EAAE,UAAU,EAAE,kCAAiC;AAOtD,MAAM,YAAY,GAAkB,MAAM,CAAC,QAAQ,CAAC,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,OAAO,MAAM;IAOjB,YACE,IAAY,EACZ,OAAe,iBAAiB,EAChC,iBAA2B,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QAEjD,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;cAEnC,IAAI,CAAC,cAAc,CAAC,IAAI,GAAG,CAAC;YAD9B,SAAS,QAEP,2DAA2D;cAG3D,IAAI,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;YADhC,SAAS,QAEP,6DAA6D;IAEjE,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAe;IACtC,OAAO,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import { devAssert } from '../jsutils/devAssert.js';\nimport { instanceOf } from '../jsutils/instanceOf.js';\n\ninterface Location {\n line: number;\n column: number;\n}\n\nconst sourceSymbol: unique symbol = Symbol('Source');\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport class Source {\n readonly __kind: symbol;\n\n body: string;\n name: string;\n locationOffset: Location;\n\n constructor(\n body: string,\n name: string = 'GraphQL request',\n locationOffset: Location = { line: 1, column: 1 },\n ) {\n this.__kind = sourceSymbol;\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n devAssert(\n this.locationOffset.line > 0,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n devAssert(\n this.locationOffset.column > 0,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag](): string {\n return 'Source';\n }\n}\n\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\nexport function isSource(source: unknown): source is Source {\n return instanceOf(source, sourceSymbol, Source);\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An exported enum describing the different kinds of tokens that the
|
|
3
|
+
* lexer emits.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TokenKind: {
|
|
6
|
+
readonly SOF: "<SOF>";
|
|
7
|
+
readonly EOF: "<EOF>";
|
|
8
|
+
readonly BANG: "!";
|
|
9
|
+
readonly DOLLAR: "$";
|
|
10
|
+
readonly AMP: "&";
|
|
11
|
+
readonly PAREN_L: "(";
|
|
12
|
+
readonly PAREN_R: ")";
|
|
13
|
+
readonly DOT: ".";
|
|
14
|
+
readonly SPREAD: "...";
|
|
15
|
+
readonly COLON: ":";
|
|
16
|
+
readonly EQUALS: "=";
|
|
17
|
+
readonly AT: "@";
|
|
18
|
+
readonly BRACKET_L: "[";
|
|
19
|
+
readonly BRACKET_R: "]";
|
|
20
|
+
readonly BRACE_L: "{";
|
|
21
|
+
readonly PIPE: "|";
|
|
22
|
+
readonly BRACE_R: "}";
|
|
23
|
+
readonly NAME: "Name";
|
|
24
|
+
readonly INT: "Int";
|
|
25
|
+
readonly FLOAT: "Float";
|
|
26
|
+
readonly STRING: "String";
|
|
27
|
+
readonly BLOCK_STRING: "BlockString";
|
|
28
|
+
readonly COMMENT: "Comment";
|
|
29
|
+
};
|
|
30
|
+
export type TokenKind = (typeof TokenKind)[keyof typeof TokenKind];
|
package/language/tokenKind.d.ts
CHANGED
package/language/tokenKind.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenKind.js","sourceRoot":"","sources":["../../src/language/tokenKind.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,GAAG,EAAE,OAAgB;IACrB,GAAG,EAAE,OAAgB;IACrB,IAAI,EAAE,GAAY;IAClB,MAAM,EAAE,GAAY;IACpB,GAAG,EAAE,GAAY;IACjB,OAAO,EAAE,GAAY;IACrB,OAAO,EAAE,GAAY;IACrB,MAAM,EAAE,KAAc;IACtB,KAAK,EAAE,GAAY;IACnB,MAAM,EAAE,GAAY;IACpB,EAAE,EAAE,GAAY;IAChB,SAAS,EAAE,GAAY;IACvB,SAAS,EAAE,GAAY;IACvB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,GAAY;IAClB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,MAAe;IACrB,GAAG,EAAE,KAAc;IACnB,KAAK,EAAE,OAAgB;IACvB,MAAM,EAAE,QAAiB;IACzB,YAAY,EAAE,aAAsB;IACpC,OAAO,EAAE,SAAkB;CACnB,CAAC","sourcesContent":["/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport const TokenKind = {\n SOF: '<SOF>' as const,\n EOF: '<EOF>' as const,\n BANG: '!' as const,\n DOLLAR: '$' as const,\n AMP: '&' as const,\n PAREN_L: '(' as const,\n PAREN_R: ')' as const,\n SPREAD: '...' as const,\n COLON: ':' as const,\n EQUALS: '=' as const,\n AT: '@' as const,\n BRACKET_L: '[' as const,\n BRACKET_R: ']' as const,\n BRACE_L: '{' as const,\n PIPE: '|' as const,\n BRACE_R: '}' as const,\n NAME: 'Name' as const,\n INT: 'Int' as const,\n FLOAT: 'Float' as const,\n STRING: 'String' as const,\n BLOCK_STRING: 'BlockString' as const,\n COMMENT: 'Comment' as const,\n} as const;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TokenKind = (typeof TokenKind)[keyof typeof TokenKind];\n"]}
|
|
1
|
+
{"version":3,"file":"tokenKind.js","sourceRoot":"","sources":["../../src/language/tokenKind.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,GAAG,EAAE,OAAgB;IACrB,GAAG,EAAE,OAAgB;IACrB,IAAI,EAAE,GAAY;IAClB,MAAM,EAAE,GAAY;IACpB,GAAG,EAAE,GAAY;IACjB,OAAO,EAAE,GAAY;IACrB,OAAO,EAAE,GAAY;IACrB,GAAG,EAAE,GAAY;IACjB,MAAM,EAAE,KAAc;IACtB,KAAK,EAAE,GAAY;IACnB,MAAM,EAAE,GAAY;IACpB,EAAE,EAAE,GAAY;IAChB,SAAS,EAAE,GAAY;IACvB,SAAS,EAAE,GAAY;IACvB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,GAAY;IAClB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,MAAe;IACrB,GAAG,EAAE,KAAc;IACnB,KAAK,EAAE,OAAgB;IACvB,MAAM,EAAE,QAAiB;IACzB,YAAY,EAAE,aAAsB;IACpC,OAAO,EAAE,SAAkB;CACnB,CAAC","sourcesContent":["/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport const TokenKind = {\n SOF: '<SOF>' as const,\n EOF: '<EOF>' as const,\n BANG: '!' as const,\n DOLLAR: '$' as const,\n AMP: '&' as const,\n PAREN_L: '(' as const,\n PAREN_R: ')' as const,\n DOT: '.' as const,\n SPREAD: '...' as const,\n COLON: ':' as const,\n EQUALS: '=' as const,\n AT: '@' as const,\n BRACKET_L: '[' as const,\n BRACKET_R: ']' as const,\n BRACE_L: '{' as const,\n PIPE: '|' as const,\n BRACE_R: '}' as const,\n NAME: 'Name' as const,\n INT: 'Int' as const,\n FLOAT: 'Float' as const,\n STRING: 'String' as const,\n BLOCK_STRING: 'BlockString' as const,\n COMMENT: 'Comment' as const,\n} as const;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TokenKind = (typeof TokenKind)[keyof typeof TokenKind];\n"]}
|
package/language/tokenKind.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenKind.js","sourceRoot":"","sources":["../../src/language/tokenKind.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,EAAE,OAAgB;IACrB,GAAG,EAAE,OAAgB;IACrB,IAAI,EAAE,GAAY;IAClB,MAAM,EAAE,GAAY;IACpB,GAAG,EAAE,GAAY;IACjB,OAAO,EAAE,GAAY;IACrB,OAAO,EAAE,GAAY;IACrB,MAAM,EAAE,KAAc;IACtB,KAAK,EAAE,GAAY;IACnB,MAAM,EAAE,GAAY;IACpB,EAAE,EAAE,GAAY;IAChB,SAAS,EAAE,GAAY;IACvB,SAAS,EAAE,GAAY;IACvB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,GAAY;IAClB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,MAAe;IACrB,GAAG,EAAE,KAAc;IACnB,KAAK,EAAE,OAAgB;IACvB,MAAM,EAAE,QAAiB;IACzB,YAAY,EAAE,aAAsB;IACpC,OAAO,EAAE,SAAkB;CACnB,CAAC","sourcesContent":["/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport const TokenKind = {\n SOF: '<SOF>' as const,\n EOF: '<EOF>' as const,\n BANG: '!' as const,\n DOLLAR: '$' as const,\n AMP: '&' as const,\n PAREN_L: '(' as const,\n PAREN_R: ')' as const,\n SPREAD: '...' as const,\n COLON: ':' as const,\n EQUALS: '=' as const,\n AT: '@' as const,\n BRACKET_L: '[' as const,\n BRACKET_R: ']' as const,\n BRACE_L: '{' as const,\n PIPE: '|' as const,\n BRACE_R: '}' as const,\n NAME: 'Name' as const,\n INT: 'Int' as const,\n FLOAT: 'Float' as const,\n STRING: 'String' as const,\n BLOCK_STRING: 'BlockString' as const,\n COMMENT: 'Comment' as const,\n} as const;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TokenKind = (typeof TokenKind)[keyof typeof TokenKind];\n"]}
|
|
1
|
+
{"version":3,"file":"tokenKind.js","sourceRoot":"","sources":["../../src/language/tokenKind.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,EAAE,OAAgB;IACrB,GAAG,EAAE,OAAgB;IACrB,IAAI,EAAE,GAAY;IAClB,MAAM,EAAE,GAAY;IACpB,GAAG,EAAE,GAAY;IACjB,OAAO,EAAE,GAAY;IACrB,OAAO,EAAE,GAAY;IACrB,GAAG,EAAE,GAAY;IACjB,MAAM,EAAE,KAAc;IACtB,KAAK,EAAE,GAAY;IACnB,MAAM,EAAE,GAAY;IACpB,EAAE,EAAE,GAAY;IAChB,SAAS,EAAE,GAAY;IACvB,SAAS,EAAE,GAAY;IACvB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,GAAY;IAClB,OAAO,EAAE,GAAY;IACrB,IAAI,EAAE,MAAe;IACrB,GAAG,EAAE,KAAc;IACnB,KAAK,EAAE,OAAgB;IACvB,MAAM,EAAE,QAAiB;IACzB,YAAY,EAAE,aAAsB;IACpC,OAAO,EAAE,SAAkB;CACnB,CAAC","sourcesContent":["/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport const TokenKind = {\n SOF: '<SOF>' as const,\n EOF: '<EOF>' as const,\n BANG: '!' as const,\n DOLLAR: '$' as const,\n AMP: '&' as const,\n PAREN_L: '(' as const,\n PAREN_R: ')' as const,\n DOT: '.' as const,\n SPREAD: '...' as const,\n COLON: ':' as const,\n EQUALS: '=' as const,\n AT: '@' as const,\n BRACKET_L: '[' as const,\n BRACKET_R: ']' as const,\n BRACE_L: '{' as const,\n PIPE: '|' as const,\n BRACE_R: '}' as const,\n NAME: 'Name' as const,\n INT: 'Int' as const,\n FLOAT: 'Float' as const,\n STRING: 'String' as const,\n BLOCK_STRING: 'BlockString' as const,\n COMMENT: 'Comment' as const,\n} as const;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TokenKind = (typeof TokenKind)[keyof typeof TokenKind];\n"]}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { ASTNode } from './ast.js';
|
|
2
|
+
import { Kind } from './kinds.js';
|
|
3
|
+
/**
|
|
4
|
+
* A visitor is provided to visit, it contains the collection of
|
|
5
|
+
* relevant functions to be called during the visitor's traversal.
|
|
6
|
+
*/
|
|
7
|
+
export type ASTVisitor = EnterLeaveVisitor<ASTNode> | KindVisitor;
|
|
8
|
+
type KindVisitor = {
|
|
9
|
+
readonly [NodeT in ASTNode as NodeT['kind']]?: ASTVisitFn<NodeT> | EnterLeaveVisitor<NodeT>;
|
|
10
|
+
};
|
|
11
|
+
interface EnterLeaveVisitor<TVisitedNode extends ASTNode> {
|
|
12
|
+
readonly enter?: ASTVisitFn<TVisitedNode> | undefined;
|
|
13
|
+
readonly leave?: ASTVisitFn<TVisitedNode> | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A visitor is comprised of visit functions, which are called on each node
|
|
17
|
+
* during the visitor's traversal.
|
|
18
|
+
*/
|
|
19
|
+
export type ASTVisitFn<TVisitedNode extends ASTNode> = (
|
|
20
|
+
/** The current node being visiting. */
|
|
21
|
+
node: TVisitedNode,
|
|
22
|
+
/** The index or key to this node from the parent node or Array. */
|
|
23
|
+
key: string | number | undefined,
|
|
24
|
+
/** The parent immediately above this node, which may be an Array. */
|
|
25
|
+
parent: ASTNode | ReadonlyArray<ASTNode> | undefined,
|
|
26
|
+
/** The key path to get to this node from the root node. */
|
|
27
|
+
path: ReadonlyArray<string | number>,
|
|
28
|
+
/**
|
|
29
|
+
* All nodes and Arrays visited before reaching parent of this node.
|
|
30
|
+
* These correspond to array indices in `path`.
|
|
31
|
+
* Note: ancestors includes arrays which contain the parent of visited node.
|
|
32
|
+
*/
|
|
33
|
+
ancestors: ReadonlyArray<ASTNode | ReadonlyArray<ASTNode>>) => any;
|
|
34
|
+
/**
|
|
35
|
+
* A reducer is comprised of reducer functions which convert AST nodes into
|
|
36
|
+
* another form.
|
|
37
|
+
*/
|
|
38
|
+
export type ASTReducer<R> = {
|
|
39
|
+
readonly [NodeT in ASTNode as NodeT['kind']]?: {
|
|
40
|
+
readonly enter?: ASTVisitFn<NodeT>;
|
|
41
|
+
readonly leave: ASTReducerFn<NodeT, R>;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type ASTReducerFn<TReducedNode extends ASTNode, R> = (
|
|
45
|
+
/** The current node being visiting. */
|
|
46
|
+
node: {
|
|
47
|
+
[K in keyof TReducedNode]: ReducedField<TReducedNode[K], R>;
|
|
48
|
+
},
|
|
49
|
+
/** The index or key to this node from the parent node or Array. */
|
|
50
|
+
key: string | number | undefined,
|
|
51
|
+
/** The parent immediately above this node, which may be an Array. */
|
|
52
|
+
parent: ASTNode | ReadonlyArray<ASTNode> | undefined,
|
|
53
|
+
/** The key path to get to this node from the root node. */
|
|
54
|
+
path: ReadonlyArray<string | number>,
|
|
55
|
+
/**
|
|
56
|
+
* All nodes and Arrays visited before reaching parent of this node.
|
|
57
|
+
* These correspond to array indices in `path`.
|
|
58
|
+
* Note: ancestors includes arrays which contain the parent of visited node.
|
|
59
|
+
*/
|
|
60
|
+
ancestors: ReadonlyArray<ASTNode | ReadonlyArray<ASTNode>>) => R;
|
|
61
|
+
type ReducedField<T, R> = T extends ASTNode ? R : T extends ReadonlyArray<ASTNode> ? ReadonlyArray<R> : T;
|
|
62
|
+
/**
|
|
63
|
+
* A KeyMap describes each the traversable properties of each kind of node.
|
|
64
|
+
*/
|
|
65
|
+
export type ASTVisitorKeyMap = {
|
|
66
|
+
[NodeT in ASTNode as NodeT['kind']]?: ReadonlyArray<keyof NodeT>;
|
|
67
|
+
};
|
|
68
|
+
export declare const BREAK: unknown;
|
|
69
|
+
/**
|
|
70
|
+
* visit() will walk through an AST using a depth-first traversal, calling
|
|
71
|
+
* the visitor's enter function at each node in the traversal, and calling the
|
|
72
|
+
* leave function after visiting that node and all of its child nodes.
|
|
73
|
+
*
|
|
74
|
+
* By returning different values from the enter and leave functions, the
|
|
75
|
+
* behavior of the visitor can be altered, including skipping over a sub-tree of
|
|
76
|
+
* the AST (by returning false), editing the AST by returning a value or null
|
|
77
|
+
* to remove the value, or to stop the whole traversal by returning BREAK.
|
|
78
|
+
*
|
|
79
|
+
* When using visit() to edit an AST, the original AST will not be modified, and
|
|
80
|
+
* a new version of the AST with the changes applied will be returned from the
|
|
81
|
+
* visit function.
|
|
82
|
+
*
|
|
83
|
+
* ```ts
|
|
84
|
+
* const editedAST = visit(ast, {
|
|
85
|
+
* enter(node, key, parent, path, ancestors) {
|
|
86
|
+
* // @return
|
|
87
|
+
* // undefined: no action
|
|
88
|
+
* // false: skip visiting this node
|
|
89
|
+
* // visitor.BREAK: stop visiting altogether
|
|
90
|
+
* // null: delete this node
|
|
91
|
+
* // any value: replace this node with the returned value
|
|
92
|
+
* },
|
|
93
|
+
* leave(node, key, parent, path, ancestors) {
|
|
94
|
+
* // @return
|
|
95
|
+
* // undefined: no action
|
|
96
|
+
* // false: no action
|
|
97
|
+
* // visitor.BREAK: stop visiting altogether
|
|
98
|
+
* // null: delete this node
|
|
99
|
+
* // any value: replace this node with the returned value
|
|
100
|
+
* }
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* Alternatively to providing enter() and leave() functions, a visitor can
|
|
105
|
+
* instead provide functions named the same as the kinds of AST nodes, or
|
|
106
|
+
* enter/leave visitors at a named key, leading to three permutations of the
|
|
107
|
+
* visitor API:
|
|
108
|
+
*
|
|
109
|
+
* 1) Named visitors triggered when entering a node of a specific kind.
|
|
110
|
+
*
|
|
111
|
+
* ```ts
|
|
112
|
+
* visit(ast, {
|
|
113
|
+
* Kind(node) {
|
|
114
|
+
* // enter the "Kind" node
|
|
115
|
+
* }
|
|
116
|
+
* })
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* 2) Named visitors that trigger upon entering and leaving a node of a specific kind.
|
|
120
|
+
*
|
|
121
|
+
* ```ts
|
|
122
|
+
* visit(ast, {
|
|
123
|
+
* Kind: {
|
|
124
|
+
* enter(node) {
|
|
125
|
+
* // enter the "Kind" node
|
|
126
|
+
* }
|
|
127
|
+
* leave(node) {
|
|
128
|
+
* // leave the "Kind" node
|
|
129
|
+
* }
|
|
130
|
+
* }
|
|
131
|
+
* })
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* 3) Generic visitors that trigger upon entering and leaving any node.
|
|
135
|
+
*
|
|
136
|
+
* ```ts
|
|
137
|
+
* visit(ast, {
|
|
138
|
+
* enter(node) {
|
|
139
|
+
* // enter any node
|
|
140
|
+
* },
|
|
141
|
+
* leave(node) {
|
|
142
|
+
* // leave any node
|
|
143
|
+
* }
|
|
144
|
+
* })
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
export declare function visit<N extends ASTNode>(root: N, visitor: ASTVisitor, visitorKeys?: ASTVisitorKeyMap): N;
|
|
148
|
+
export declare function visit<R>(root: ASTNode, visitor: ASTReducer<R>, visitorKeys?: ASTVisitorKeyMap): R;
|
|
149
|
+
/**
|
|
150
|
+
* Creates a new visitor instance which delegates to many visitors to run in
|
|
151
|
+
* parallel. Each visitor will be visited for each node before moving on.
|
|
152
|
+
*
|
|
153
|
+
* If a prior visitor edits a node, no following visitors will see that node.
|
|
154
|
+
*/
|
|
155
|
+
export declare function visitInParallel(visitors: ReadonlyArray<ASTVisitor>): ASTVisitor;
|
|
156
|
+
/**
|
|
157
|
+
* Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.
|
|
158
|
+
*/
|
|
159
|
+
export declare function getEnterLeaveForKind(visitor: ASTVisitor, kind: Kind): EnterLeaveVisitor<ASTNode>;
|
|
160
|
+
export {};
|
package/language/visitor.js
CHANGED
|
@@ -50,7 +50,7 @@ function visit(root, visitor, visitorKeys = ast_js_1.QueryDocumentKeys) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
node =
|
|
53
|
+
node = { ...node };
|
|
54
54
|
for (const [editKey, editValue] of edits) {
|
|
55
55
|
node[editKey] = editValue;
|
|
56
56
|
}
|
|
@@ -72,7 +72,8 @@ function visit(root, visitor, visitorKeys = ast_js_1.QueryDocumentKeys) {
|
|
|
72
72
|
}
|
|
73
73
|
let result;
|
|
74
74
|
if (!Array.isArray(node)) {
|
|
75
|
-
((0, ast_js_1.isNode)(node))
|
|
75
|
+
if (!((0, ast_js_1.isNode)(node)))
|
|
76
|
+
(0, devAssert_js_1.devAssert)(false, `Invalid AST Node: ${(0, inspect_js_1.inspect)(node)}.`);
|
|
76
77
|
const visitFn = isLeaving
|
|
77
78
|
? enterLeaveMap.get(node.kind)?.leave
|
|
78
79
|
: enterLeaveMap.get(node.kind)?.enter;
|