graphql 16.13.2 → 16.14.1
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/error/GraphQLError.d.ts +151 -15
- package/error/GraphQLError.js +143 -12
- package/error/GraphQLError.mjs +143 -12
- package/error/index.d.ts +6 -0
- package/error/index.mjs +6 -0
- package/error/locatedError.d.ts +20 -0
- package/error/locatedError.js +21 -0
- package/error/locatedError.mjs +20 -0
- package/error/syntaxError.d.ts +15 -0
- package/error/syntaxError.js +16 -0
- package/error/syntaxError.mjs +15 -0
- package/execution/collectFields.js +6 -0
- package/execution/collectFields.mjs +6 -0
- package/execution/execute.d.ts +211 -12
- package/execution/execute.js +214 -23
- package/execution/execute.mjs +213 -23
- package/execution/index.d.ts +6 -0
- package/execution/index.mjs +6 -0
- package/execution/mapAsyncIterator.d.ts +2 -0
- package/execution/mapAsyncIterator.js +2 -0
- package/execution/mapAsyncIterator.mjs +2 -0
- package/execution/subscribe.d.ts +195 -5
- package/execution/subscribe.js +154 -11
- package/execution/subscribe.mjs +153 -11
- package/execution/values.d.ts +167 -10
- package/execution/values.js +149 -5
- package/execution/values.mjs +148 -5
- package/graphql.d.ts +163 -41
- package/graphql.js +126 -4
- package/graphql.mjs +131 -41
- package/index.d.ts +12 -17
- package/index.mjs +13 -19
- package/jsutils/Maybe.d.ts +5 -1
- package/jsutils/ObjMap.d.ts +4 -0
- package/jsutils/Path.d.ts +30 -0
- package/jsutils/Path.js +29 -0
- package/jsutils/Path.mjs +29 -0
- package/jsutils/PromiseOrValue.d.ts +1 -0
- package/jsutils/devAssert.d.ts +1 -0
- package/jsutils/devAssert.js +1 -0
- package/jsutils/devAssert.mjs +1 -0
- package/jsutils/didYouMean.d.ts +4 -1
- package/jsutils/didYouMean.js +4 -1
- package/jsutils/didYouMean.mjs +4 -1
- package/jsutils/groupBy.d.ts +2 -0
- package/jsutils/groupBy.js +2 -0
- package/jsutils/groupBy.mjs +2 -0
- package/jsutils/identityFunc.d.ts +2 -0
- package/jsutils/identityFunc.js +2 -0
- package/jsutils/identityFunc.mjs +2 -0
- package/jsutils/inspect.d.ts +2 -0
- package/jsutils/inspect.js +2 -0
- package/jsutils/inspect.mjs +2 -0
- package/jsutils/instanceOf.d.ts +2 -0
- package/jsutils/instanceOf.js +2 -0
- package/jsutils/instanceOf.mjs +2 -0
- package/jsutils/invariant.d.ts +1 -0
- package/jsutils/invariant.js +1 -0
- package/jsutils/invariant.mjs +1 -0
- package/jsutils/isAsyncIterable.d.ts +2 -0
- package/jsutils/isAsyncIterable.js +2 -0
- package/jsutils/isAsyncIterable.mjs +2 -0
- package/jsutils/isIterableObject.d.ts +6 -5
- package/jsutils/isIterableObject.js +6 -5
- package/jsutils/isIterableObject.mjs +6 -5
- package/jsutils/isObjectLike.d.ts +2 -0
- package/jsutils/isObjectLike.js +2 -0
- package/jsutils/isObjectLike.mjs +2 -0
- package/jsutils/isPromise.d.ts +2 -0
- package/jsutils/isPromise.js +2 -0
- package/jsutils/isPromise.mjs +2 -0
- package/jsutils/keyMap.d.ts +7 -14
- package/jsutils/keyMap.js +7 -14
- package/jsutils/keyMap.mjs +7 -14
- package/jsutils/keyValMap.d.ts +9 -6
- package/jsutils/keyValMap.js +9 -6
- package/jsutils/keyValMap.mjs +9 -6
- package/jsutils/mapValue.d.ts +2 -0
- package/jsutils/mapValue.js +2 -0
- package/jsutils/mapValue.mjs +2 -0
- package/jsutils/memoize3.d.ts +2 -0
- package/jsutils/memoize3.js +2 -0
- package/jsutils/memoize3.mjs +2 -0
- package/jsutils/naturalCompare.d.ts +2 -0
- package/jsutils/naturalCompare.js +2 -0
- package/jsutils/naturalCompare.mjs +2 -0
- package/jsutils/printPathArray.d.ts +2 -0
- package/jsutils/printPathArray.js +2 -0
- package/jsutils/printPathArray.mjs +2 -0
- package/jsutils/promiseForObject.d.ts +2 -0
- package/jsutils/promiseForObject.js +2 -0
- package/jsutils/promiseForObject.mjs +2 -0
- package/jsutils/promiseReduce.d.ts +2 -0
- package/jsutils/promiseReduce.js +2 -0
- package/jsutils/promiseReduce.mjs +2 -0
- package/jsutils/suggestionList.d.ts +2 -0
- package/jsutils/suggestionList.js +4 -0
- package/jsutils/suggestionList.mjs +4 -0
- package/jsutils/toError.d.ts +2 -0
- package/jsutils/toError.js +2 -0
- package/jsutils/toError.mjs +2 -0
- package/jsutils/toObjMap.d.ts +1 -0
- package/jsutils/toObjMap.js +1 -0
- package/jsutils/toObjMap.mjs +1 -0
- package/language/ast.d.ts +422 -55
- package/language/ast.js +103 -39
- package/language/ast.mjs +103 -39
- package/language/blockString.d.ts +1 -3
- package/language/blockString.js +1 -3
- package/language/blockString.mjs +1 -3
- package/language/directiveLocation.d.ts +29 -8
- package/language/directiveLocation.js +10 -6
- package/language/directiveLocation.mjs +10 -6
- package/language/index.d.ts +7 -0
- package/language/index.mjs +6 -0
- package/language/kinds.d.ts +58 -18
- package/language/kinds.js +10 -6
- package/language/kinds.mjs +10 -6
- package/language/lexer.d.ts +47 -14
- package/language/lexer.js +71 -13
- package/language/lexer.mjs +70 -13
- package/language/location.d.ts +16 -3
- package/language/location.js +14 -3
- package/language/location.mjs +14 -3
- package/language/parser.d.ts +248 -11
- package/language/parser.js +257 -0
- package/language/parser.mjs +257 -3
- package/language/predicates.d.ts +169 -0
- package/language/predicates.js +173 -1
- package/language/predicates.mjs +185 -1
- package/language/printLocation.d.ts +28 -0
- package/language/printLocation.js +29 -0
- package/language/printLocation.mjs +28 -0
- package/language/printString.d.ts +2 -0
- package/language/printString.js +5 -1
- package/language/printString.mjs +5 -1
- package/language/printer.d.ts +12 -0
- package/language/printer.js +32 -1
- package/language/printer.mjs +31 -1
- package/language/schemaCoordinateLexer.d.ts +8 -6
- package/language/schemaCoordinateLexer.js +10 -6
- package/language/schemaCoordinateLexer.mjs +10 -6
- package/language/source.d.ts +28 -0
- package/language/source.js +32 -0
- package/language/source.mjs +31 -0
- package/language/tokenKind.d.ts +30 -3
- package/language/tokenKind.js +8 -3
- package/language/tokenKind.mjs +8 -3
- package/language/visitor.d.ts +200 -72
- package/language/visitor.js +122 -50
- package/language/visitor.mjs +122 -54
- package/package.json +1 -1
- package/subscription/index.d.ts +9 -3
- package/subscription/index.mjs +9 -3
- package/type/assertName.d.ts +18 -1
- package/type/assertName.js +19 -1
- package/type/assertName.mjs +18 -1
- package/type/definition.d.ts +2540 -79
- package/type/definition.js +2214 -61
- package/type/definition.mjs +2241 -60
- package/type/directives.d.ts +202 -19
- package/type/directives.js +206 -20
- package/type/directives.mjs +206 -20
- package/type/index.d.ts +6 -0
- package/type/index.mjs +6 -0
- package/type/introspection.d.ts +36 -0
- package/type/introspection.js +57 -1
- package/type/introspection.mjs +65 -1
- package/type/scalars.d.ts +29 -2
- package/type/scalars.js +37 -2
- package/type/scalars.mjs +36 -2
- package/type/schema.d.ts +490 -28
- package/type/schema.js +484 -26
- package/type/schema.mjs +484 -26
- package/type/validate.d.ts +31 -0
- package/type/validate.js +32 -0
- package/type/validate.mjs +31 -0
- package/utilities/TypeInfo.d.ts +441 -1
- package/utilities/TypeInfo.js +444 -1
- package/utilities/TypeInfo.mjs +443 -1
- package/utilities/assertValidName.d.ts +27 -2
- package/utilities/assertValidName.js +28 -2
- package/utilities/assertValidName.mjs +27 -2
- package/utilities/astFromValue.d.ts +33 -3
- package/utilities/astFromValue.js +36 -3
- package/utilities/astFromValue.mjs +35 -3
- package/utilities/buildASTSchema.d.ts +65 -6
- package/utilities/buildASTSchema.js +69 -6
- package/utilities/buildASTSchema.mjs +69 -6
- package/utilities/buildClientSchema.d.ts +15 -0
- package/utilities/buildClientSchema.js +17 -0
- package/utilities/buildClientSchema.mjs +16 -0
- package/utilities/coerceInputValue.d.ts +46 -0
- package/utilities/coerceInputValue.js +47 -0
- package/utilities/coerceInputValue.mjs +46 -0
- package/utilities/concatAST.d.ts +12 -0
- package/utilities/concatAST.js +13 -0
- package/utilities/concatAST.mjs +12 -0
- package/utilities/extendSchema.d.ts +56 -3
- package/utilities/extendSchema.js +121 -6
- package/utilities/extendSchema.mjs +120 -6
- package/utilities/findBreakingChanges.d.ts +95 -0
- package/utilities/findBreakingChanges.js +68 -0
- package/utilities/findBreakingChanges.mjs +70 -0
- package/utilities/getIntrospectionQuery.d.ts +148 -0
- package/utilities/getIntrospectionQuery.js +72 -38
- package/utilities/getIntrospectionQuery.mjs +72 -38
- package/utilities/getOperationAST.d.ts +15 -0
- package/utilities/getOperationAST.js +16 -0
- package/utilities/getOperationAST.mjs +15 -0
- package/utilities/getOperationRootType.d.ts +18 -1
- package/utilities/getOperationRootType.js +19 -1
- package/utilities/getOperationRootType.mjs +18 -1
- package/utilities/index.d.ts +7 -0
- package/utilities/index.mjs +7 -0
- package/utilities/introspectionFromSchema.d.ts +54 -0
- package/utilities/introspectionFromSchema.js +56 -0
- package/utilities/introspectionFromSchema.mjs +55 -0
- package/utilities/lexicographicSortSchema.d.ts +35 -0
- package/utilities/lexicographicSortSchema.js +36 -0
- package/utilities/lexicographicSortSchema.mjs +35 -0
- package/utilities/printSchema.d.ts +63 -0
- package/utilities/printSchema.js +67 -0
- package/utilities/printSchema.mjs +68 -0
- package/utilities/resolveSchemaCoordinate.d.ts +62 -0
- package/utilities/resolveSchemaCoordinate.js +64 -0
- package/utilities/resolveSchemaCoordinate.mjs +63 -0
- package/utilities/separateOperations.d.ts +30 -0
- package/utilities/separateOperations.js +31 -0
- package/utilities/separateOperations.mjs +30 -0
- package/utilities/stripIgnoredCharacters.d.ts +13 -6
- package/utilities/stripIgnoredCharacters.js +16 -6
- package/utilities/stripIgnoredCharacters.mjs +15 -6
- package/utilities/typeComparators.d.ts +84 -0
- package/utilities/typeComparators.js +85 -0
- package/utilities/typeComparators.mjs +84 -0
- package/utilities/typeFromAST.d.ts +86 -0
- package/utilities/typeFromAST.js +3 -0
- package/utilities/typeFromAST.mjs +3 -0
- package/utilities/typedQueryDocumentNode.d.ts +4 -0
- package/utilities/valueFromAST.d.ts +38 -0
- package/utilities/valueFromAST.js +51 -2
- package/utilities/valueFromAST.mjs +50 -2
- package/utilities/valueFromASTUntyped.d.ts +15 -2
- package/utilities/valueFromASTUntyped.js +16 -2
- package/utilities/valueFromASTUntyped.mjs +15 -2
- package/validation/ValidationContext.d.ts +399 -0
- package/validation/ValidationContext.js +400 -0
- package/validation/ValidationContext.mjs +401 -0
- package/validation/index.d.ts +6 -0
- package/validation/index.mjs +6 -0
- package/validation/rules/ExecutableDefinitionsRule.d.ts +28 -0
- package/validation/rules/ExecutableDefinitionsRule.js +29 -0
- package/validation/rules/ExecutableDefinitionsRule.mjs +28 -0
- package/validation/rules/FieldsOnCorrectTypeRule.d.ts +28 -0
- package/validation/rules/FieldsOnCorrectTypeRule.js +33 -0
- package/validation/rules/FieldsOnCorrectTypeRule.mjs +32 -0
- package/validation/rules/FragmentsOnCompositeTypesRule.d.ts +28 -0
- package/validation/rules/FragmentsOnCompositeTypesRule.js +29 -0
- package/validation/rules/FragmentsOnCompositeTypesRule.mjs +28 -0
- package/validation/rules/KnownArgumentNamesRule.d.ts +29 -3
- package/validation/rules/KnownArgumentNamesRule.js +30 -3
- package/validation/rules/KnownArgumentNamesRule.mjs +29 -3
- package/validation/rules/KnownDirectivesRule.d.ts +28 -0
- package/validation/rules/KnownDirectivesRule.js +33 -0
- package/validation/rules/KnownDirectivesRule.mjs +32 -0
- package/validation/rules/KnownFragmentNamesRule.d.ts +28 -0
- package/validation/rules/KnownFragmentNamesRule.js +29 -0
- package/validation/rules/KnownFragmentNamesRule.mjs +28 -0
- package/validation/rules/KnownTypeNamesRule.d.ts +28 -0
- package/validation/rules/KnownTypeNamesRule.js +29 -0
- package/validation/rules/KnownTypeNamesRule.mjs +28 -0
- package/validation/rules/LoneAnonymousOperationRule.d.ts +28 -0
- package/validation/rules/LoneAnonymousOperationRule.js +29 -0
- package/validation/rules/LoneAnonymousOperationRule.mjs +28 -0
- package/validation/rules/LoneSchemaDefinitionRule.d.ts +21 -0
- package/validation/rules/LoneSchemaDefinitionRule.js +22 -0
- package/validation/rules/LoneSchemaDefinitionRule.mjs +21 -0
- package/validation/rules/MaxIntrospectionDepthRule.d.ts +31 -0
- package/validation/rules/MaxIntrospectionDepthRule.js +33 -0
- package/validation/rules/MaxIntrospectionDepthRule.mjs +34 -0
- package/validation/rules/NoFragmentCyclesRule.d.ts +28 -0
- package/validation/rules/NoFragmentCyclesRule.js +29 -0
- package/validation/rules/NoFragmentCyclesRule.mjs +28 -0
- package/validation/rules/NoUndefinedVariablesRule.d.ts +28 -0
- package/validation/rules/NoUndefinedVariablesRule.js +29 -0
- package/validation/rules/NoUndefinedVariablesRule.mjs +28 -0
- package/validation/rules/NoUnusedFragmentsRule.d.ts +28 -0
- package/validation/rules/NoUnusedFragmentsRule.js +29 -0
- package/validation/rules/NoUnusedFragmentsRule.mjs +28 -0
- package/validation/rules/NoUnusedVariablesRule.d.ts +29 -0
- package/validation/rules/NoUnusedVariablesRule.js +30 -0
- package/validation/rules/NoUnusedVariablesRule.mjs +29 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +33 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule.js +45 -6
- package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +45 -6
- package/validation/rules/PossibleFragmentSpreadsRule.d.ts +36 -0
- package/validation/rules/PossibleFragmentSpreadsRule.js +37 -0
- package/validation/rules/PossibleFragmentSpreadsRule.mjs +36 -0
- package/validation/rules/PossibleTypeExtensionsRule.d.ts +21 -0
- package/validation/rules/PossibleTypeExtensionsRule.js +22 -0
- package/validation/rules/PossibleTypeExtensionsRule.mjs +21 -0
- package/validation/rules/ProvidedRequiredArgumentsRule.d.ts +29 -3
- package/validation/rules/ProvidedRequiredArgumentsRule.js +30 -3
- package/validation/rules/ProvidedRequiredArgumentsRule.mjs +29 -3
- package/validation/rules/ScalarLeafsRule.d.ts +28 -0
- package/validation/rules/ScalarLeafsRule.js +29 -0
- package/validation/rules/ScalarLeafsRule.mjs +28 -0
- package/validation/rules/SingleFieldSubscriptionsRule.d.ts +33 -0
- package/validation/rules/SingleFieldSubscriptionsRule.js +34 -0
- package/validation/rules/SingleFieldSubscriptionsRule.mjs +33 -0
- package/validation/rules/UniqueArgumentDefinitionNamesRule.d.ts +21 -0
- package/validation/rules/UniqueArgumentDefinitionNamesRule.js +22 -0
- package/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +21 -0
- package/validation/rules/UniqueArgumentNamesRule.d.ts +28 -0
- package/validation/rules/UniqueArgumentNamesRule.js +29 -0
- package/validation/rules/UniqueArgumentNamesRule.mjs +28 -0
- package/validation/rules/UniqueDirectiveNamesRule.d.ts +21 -0
- package/validation/rules/UniqueDirectiveNamesRule.js +22 -0
- package/validation/rules/UniqueDirectiveNamesRule.mjs +21 -0
- package/validation/rules/UniqueDirectivesPerLocationRule.d.ts +28 -0
- package/validation/rules/UniqueDirectivesPerLocationRule.js +41 -0
- package/validation/rules/UniqueDirectivesPerLocationRule.mjs +40 -0
- package/validation/rules/UniqueEnumValueNamesRule.d.ts +21 -0
- package/validation/rules/UniqueEnumValueNamesRule.js +22 -0
- package/validation/rules/UniqueEnumValueNamesRule.mjs +21 -0
- package/validation/rules/UniqueFieldDefinitionNamesRule.d.ts +21 -0
- package/validation/rules/UniqueFieldDefinitionNamesRule.js +22 -0
- package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +21 -0
- package/validation/rules/UniqueFragmentNamesRule.d.ts +28 -0
- package/validation/rules/UniqueFragmentNamesRule.js +29 -0
- package/validation/rules/UniqueFragmentNamesRule.mjs +28 -0
- package/validation/rules/UniqueInputFieldNamesRule.d.ts +32 -0
- package/validation/rules/UniqueInputFieldNamesRule.js +33 -0
- package/validation/rules/UniqueInputFieldNamesRule.mjs +32 -0
- package/validation/rules/UniqueOperationNamesRule.d.ts +28 -0
- package/validation/rules/UniqueOperationNamesRule.js +29 -0
- package/validation/rules/UniqueOperationNamesRule.mjs +28 -0
- package/validation/rules/UniqueOperationTypesRule.d.ts +21 -0
- package/validation/rules/UniqueOperationTypesRule.js +22 -0
- package/validation/rules/UniqueOperationTypesRule.mjs +21 -0
- package/validation/rules/UniqueTypeNamesRule.d.ts +21 -0
- package/validation/rules/UniqueTypeNamesRule.js +22 -0
- package/validation/rules/UniqueTypeNamesRule.mjs +21 -0
- package/validation/rules/UniqueVariableNamesRule.d.ts +28 -0
- package/validation/rules/UniqueVariableNamesRule.js +29 -0
- package/validation/rules/UniqueVariableNamesRule.mjs +28 -0
- package/validation/rules/ValuesOfCorrectTypeRule.d.ts +28 -0
- package/validation/rules/ValuesOfCorrectTypeRule.js +31 -0
- package/validation/rules/ValuesOfCorrectTypeRule.mjs +30 -0
- package/validation/rules/VariablesAreInputTypesRule.d.ts +32 -0
- package/validation/rules/VariablesAreInputTypesRule.js +33 -0
- package/validation/rules/VariablesAreInputTypesRule.mjs +32 -0
- package/validation/rules/VariablesInAllowedPositionRule.d.ts +28 -0
- package/validation/rules/VariablesInAllowedPositionRule.js +35 -1
- package/validation/rules/VariablesInAllowedPositionRule.mjs +34 -1
- package/validation/rules/custom/NoDeprecatedCustomRule.d.ts +41 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.js +42 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.mjs +41 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +28 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +29 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +28 -0
- package/validation/specifiedRules.d.ts +2 -3
- package/validation/specifiedRules.js +2 -3
- package/validation/specifiedRules.mjs +2 -3
- package/validation/validate.d.ts +70 -9
- package/validation/validate.js +63 -7
- package/validation/validate.mjs +63 -7
- package/version.d.ts +3 -6
- package/version.js +7 -9
- package/version.mjs +6 -9
package/language/ast.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @category AST */
|
|
1
2
|
import type { Kind } from './kinds';
|
|
2
3
|
import type { Source } from './source';
|
|
3
4
|
import type { TokenKind } from './tokenKind';
|
|
@@ -6,28 +7,54 @@ import type { TokenKind } from './tokenKind';
|
|
|
6
7
|
* identify the region of the source from which the AST derived.
|
|
7
8
|
*/
|
|
8
9
|
export declare class Location {
|
|
9
|
-
/**
|
|
10
|
-
* The character offset at which this Node begins.
|
|
11
|
-
*/
|
|
10
|
+
/** The character offset at which this Node begins. */
|
|
12
11
|
readonly start: number;
|
|
13
|
-
/**
|
|
14
|
-
* The character offset at which this Node ends.
|
|
15
|
-
*/
|
|
12
|
+
/** The character offset at which this Node ends. */
|
|
16
13
|
readonly end: number;
|
|
17
|
-
/**
|
|
18
|
-
* The Token at which this Node begins.
|
|
19
|
-
*/
|
|
14
|
+
/** The Token at which this Node begins. */
|
|
20
15
|
readonly startToken: Token;
|
|
21
|
-
/**
|
|
22
|
-
* The Token at which this Node ends.
|
|
23
|
-
*/
|
|
16
|
+
/** The Token at which this Node ends. */
|
|
24
17
|
readonly endToken: Token;
|
|
18
|
+
/** The Source document the AST represents. */
|
|
19
|
+
readonly source: Source;
|
|
25
20
|
/**
|
|
26
|
-
*
|
|
21
|
+
* Creates a Location instance.
|
|
22
|
+
* @param startToken - The start token.
|
|
23
|
+
* @param endToken - The end token.
|
|
24
|
+
* @param source - Source document used to derive error locations.
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { Location, Source, Token, TokenKind } from 'graphql/language';
|
|
28
|
+
*
|
|
29
|
+
* const source = new Source('{ hello }');
|
|
30
|
+
* const startToken = new Token(TokenKind.BRACE_L, 0, 1, 1, 1);
|
|
31
|
+
* const endToken = new Token(TokenKind.BRACE_R, 8, 9, 1, 9);
|
|
32
|
+
* const location = new Location(startToken, endToken, source);
|
|
33
|
+
*
|
|
34
|
+
* location.start; // => 0
|
|
35
|
+
* location.end; // => 9
|
|
36
|
+
* location.source.body; // => '{ hello }'
|
|
37
|
+
* ```
|
|
27
38
|
*/
|
|
28
|
-
readonly source: Source;
|
|
29
39
|
constructor(startToken: Token, endToken: Token, source: Source);
|
|
40
|
+
/**
|
|
41
|
+
* Returns the value used by `Object.prototype.toString`.
|
|
42
|
+
* @returns The built-in string tag for this object.
|
|
43
|
+
*/
|
|
30
44
|
get [Symbol.toStringTag](): string;
|
|
45
|
+
/**
|
|
46
|
+
* Returns a JSON representation of this location.
|
|
47
|
+
* @returns The JSON-serializable representation.
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import { parse } from 'graphql/language';
|
|
51
|
+
*
|
|
52
|
+
* const document = parse('{ hello }');
|
|
53
|
+
* const location = document.loc?.toJSON();
|
|
54
|
+
*
|
|
55
|
+
* location; // => { start: 0, end: 9 }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
31
58
|
toJSON(): {
|
|
32
59
|
start: number;
|
|
33
60
|
end: number;
|
|
@@ -38,25 +65,15 @@ export declare class Location {
|
|
|
38
65
|
* within a Source.
|
|
39
66
|
*/
|
|
40
67
|
export declare class Token {
|
|
41
|
-
/**
|
|
42
|
-
* The kind of Token.
|
|
43
|
-
*/
|
|
68
|
+
/** The kind of Token. */
|
|
44
69
|
readonly kind: TokenKind;
|
|
45
|
-
/**
|
|
46
|
-
* The character offset at which this Node begins.
|
|
47
|
-
*/
|
|
70
|
+
/** The character offset at which this Node begins. */
|
|
48
71
|
readonly start: number;
|
|
49
|
-
/**
|
|
50
|
-
* The character offset at which this Node ends.
|
|
51
|
-
*/
|
|
72
|
+
/** The character offset at which this Node ends. */
|
|
52
73
|
readonly end: number;
|
|
53
|
-
/**
|
|
54
|
-
* The 1-indexed line number on which this Token appears.
|
|
55
|
-
*/
|
|
74
|
+
/** The 1-indexed line number on which this Token appears. */
|
|
56
75
|
readonly line: number;
|
|
57
|
-
/**
|
|
58
|
-
* The 1-indexed column number at which this Token begins.
|
|
59
|
-
*/
|
|
76
|
+
/** The 1-indexed column number at which this Token begins. */
|
|
60
77
|
readonly column: number;
|
|
61
78
|
/**
|
|
62
79
|
* For non-punctuation tokens, represents the interpreted value of the token.
|
|
@@ -71,7 +88,27 @@ export declare class Token {
|
|
|
71
88
|
* the last.
|
|
72
89
|
*/
|
|
73
90
|
readonly prev: Token | null;
|
|
91
|
+
/** Next token in the token stream, including ignored tokens. */
|
|
74
92
|
readonly next: Token | null;
|
|
93
|
+
/**
|
|
94
|
+
* Creates a Token instance.
|
|
95
|
+
* @param kind - Token kind produced by lexical analysis.
|
|
96
|
+
* @param start - Character offset where this token begins.
|
|
97
|
+
* @param end - Character offset where this token ends.
|
|
98
|
+
* @param line - One-indexed line number where this token begins.
|
|
99
|
+
* @param column - One-indexed column number where this token begins.
|
|
100
|
+
* @param value - Interpreted value for non-punctuation tokens.
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { Token, TokenKind } from 'graphql/language';
|
|
104
|
+
*
|
|
105
|
+
* const token = new Token(TokenKind.NAME, 2, 7, 1, 3, 'hello');
|
|
106
|
+
*
|
|
107
|
+
* token.kind; // => TokenKind.NAME
|
|
108
|
+
* token.value; // => 'hello'
|
|
109
|
+
* token.toJSON(); // => { kind: 'Name', value: 'hello', line: 1, column: 3 }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
75
112
|
constructor(
|
|
76
113
|
kind: TokenKind,
|
|
77
114
|
start: number,
|
|
@@ -80,7 +117,24 @@ export declare class Token {
|
|
|
80
117
|
column: number,
|
|
81
118
|
value?: string,
|
|
82
119
|
);
|
|
120
|
+
/**
|
|
121
|
+
* Returns the value used by `Object.prototype.toString`.
|
|
122
|
+
* @returns The built-in string tag for this object.
|
|
123
|
+
*/
|
|
83
124
|
get [Symbol.toStringTag](): string;
|
|
125
|
+
/**
|
|
126
|
+
* Returns a JSON representation of this token.
|
|
127
|
+
* @returns The JSON-serializable representation.
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* import { Lexer, Source } from 'graphql/language';
|
|
131
|
+
*
|
|
132
|
+
* const lexer = new Lexer(new Source('{ hello }'));
|
|
133
|
+
* const token = lexer.advance().toJSON();
|
|
134
|
+
*
|
|
135
|
+
* token; // => { kind: '{', value: undefined, line: 1, column: 1 }
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
84
138
|
toJSON(): {
|
|
85
139
|
kind: TokenKind;
|
|
86
140
|
value?: string;
|
|
@@ -88,9 +142,7 @@ export declare class Token {
|
|
|
88
142
|
column: number;
|
|
89
143
|
};
|
|
90
144
|
}
|
|
91
|
-
/**
|
|
92
|
-
* The list of all possible AST node types.
|
|
93
|
-
*/
|
|
145
|
+
/** The list of all possible AST node types. */
|
|
94
146
|
export declare type ASTNode =
|
|
95
147
|
| NameNode
|
|
96
148
|
| DocumentNode
|
|
@@ -135,133 +187,213 @@ export declare type ASTNode =
|
|
|
135
187
|
| UnionTypeExtensionNode
|
|
136
188
|
| EnumTypeExtensionNode
|
|
137
189
|
| InputObjectTypeExtensionNode
|
|
190
|
+
| DirectiveExtensionNode
|
|
138
191
|
| TypeCoordinateNode
|
|
139
192
|
| MemberCoordinateNode
|
|
140
193
|
| ArgumentCoordinateNode
|
|
141
194
|
| DirectiveCoordinateNode
|
|
142
195
|
| DirectiveArgumentCoordinateNode;
|
|
143
|
-
/**
|
|
144
|
-
* Utility type listing all nodes indexed by their kind.
|
|
145
|
-
*/
|
|
196
|
+
/** Utility type listing all nodes indexed by their kind. */
|
|
146
197
|
export declare type ASTKindToNode = {
|
|
147
198
|
[NodeT in ASTNode as NodeT['kind']]: NodeT;
|
|
148
199
|
};
|
|
149
|
-
/**
|
|
150
|
-
* @internal
|
|
151
|
-
*/
|
|
200
|
+
/** @internal */
|
|
152
201
|
export declare const QueryDocumentKeys: {
|
|
153
202
|
[NodeT in ASTNode as NodeT['kind']]: ReadonlyArray<keyof NodeT>;
|
|
154
203
|
};
|
|
155
|
-
/**
|
|
156
|
-
* @internal
|
|
157
|
-
*/
|
|
204
|
+
/** @internal */
|
|
158
205
|
export declare function isNode(maybeNode: any): maybeNode is ASTNode;
|
|
159
|
-
/**
|
|
206
|
+
/** An identifier in a GraphQL document. */
|
|
160
207
|
export interface NameNode {
|
|
208
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
161
209
|
readonly kind: Kind.NAME;
|
|
210
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
162
211
|
readonly loc?: Location;
|
|
212
|
+
/** Parsed value represented by this node. */
|
|
163
213
|
readonly value: string;
|
|
164
214
|
}
|
|
165
|
-
/**
|
|
215
|
+
/** The root AST node for a parsed GraphQL document. */
|
|
166
216
|
export interface DocumentNode {
|
|
217
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
167
218
|
readonly kind: Kind.DOCUMENT;
|
|
219
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
168
220
|
readonly loc?: Location;
|
|
221
|
+
/** Top-level executable and type-system definitions in this document. */
|
|
169
222
|
readonly definitions: ReadonlyArray<DefinitionNode>;
|
|
223
|
+
/** The number of lexical tokens parsed for this document, if token counting was enabled. */
|
|
170
224
|
readonly tokenCount?: number | undefined;
|
|
171
225
|
}
|
|
226
|
+
/** Any top-level definition that may appear in a GraphQL document. */
|
|
172
227
|
export declare type DefinitionNode =
|
|
173
228
|
| ExecutableDefinitionNode
|
|
174
229
|
| TypeSystemDefinitionNode
|
|
175
230
|
| TypeSystemExtensionNode;
|
|
231
|
+
/** Any executable definition that may appear in an operation document. */
|
|
176
232
|
export declare type ExecutableDefinitionNode =
|
|
177
233
|
| OperationDefinitionNode
|
|
178
234
|
| FragmentDefinitionNode;
|
|
235
|
+
/** A query, mutation, or subscription operation definition. */
|
|
179
236
|
export interface OperationDefinitionNode {
|
|
237
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
180
238
|
readonly kind: Kind.OPERATION_DEFINITION;
|
|
239
|
+
/** The optional GraphQL description associated with this definition. */
|
|
181
240
|
readonly description?: StringValueNode;
|
|
241
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
182
242
|
readonly loc?: Location;
|
|
243
|
+
/** The operation selected for execution. */
|
|
183
244
|
readonly operation: OperationTypeNode;
|
|
245
|
+
/** Name node identifying this AST node. */
|
|
184
246
|
readonly name?: NameNode;
|
|
247
|
+
/** Variable definitions declared by this operation or fragment. */
|
|
185
248
|
readonly variableDefinitions?: ReadonlyArray<VariableDefinitionNode>;
|
|
249
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
186
250
|
readonly directives?: ReadonlyArray<DirectiveNode>;
|
|
251
|
+
/** Selections made by this operation, field, or fragment. */
|
|
187
252
|
readonly selectionSet: SelectionSetNode;
|
|
188
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* The operation types supported by GraphQL executable definitions.
|
|
256
|
+
* @category Kinds
|
|
257
|
+
*/
|
|
189
258
|
declare enum OperationTypeNode {
|
|
259
|
+
/** A query operation. */
|
|
190
260
|
QUERY = 'query',
|
|
261
|
+
/** A mutation operation. */
|
|
191
262
|
MUTATION = 'mutation',
|
|
263
|
+
/** A subscription operation. */
|
|
192
264
|
SUBSCRIPTION = 'subscription',
|
|
193
265
|
}
|
|
194
266
|
export { OperationTypeNode };
|
|
267
|
+
/** A variable declaration in an operation or legacy fragment definition. */
|
|
195
268
|
export interface VariableDefinitionNode {
|
|
269
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
196
270
|
readonly kind: Kind.VARIABLE_DEFINITION;
|
|
271
|
+
/** The optional GraphQL description associated with this definition. */
|
|
197
272
|
readonly description?: StringValueNode;
|
|
273
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
198
274
|
readonly loc?: Location;
|
|
275
|
+
/** The variable being defined or referenced. */
|
|
199
276
|
readonly variable: VariableNode;
|
|
277
|
+
/** The GraphQL type reference or runtime type for this element. */
|
|
200
278
|
readonly type: TypeNode;
|
|
279
|
+
/** Default value used when no explicit value is supplied. */
|
|
201
280
|
readonly defaultValue?: ConstValueNode;
|
|
281
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
202
282
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
203
283
|
}
|
|
284
|
+
/** A variable reference, such as `$id`. */
|
|
204
285
|
export interface VariableNode {
|
|
286
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
205
287
|
readonly kind: Kind.VARIABLE;
|
|
288
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
206
289
|
readonly loc?: Location;
|
|
290
|
+
/** Name node identifying this AST node. */
|
|
207
291
|
readonly name: NameNode;
|
|
208
292
|
}
|
|
293
|
+
/** A set of fields and fragments selected from an object, interface, or union. */
|
|
209
294
|
export interface SelectionSetNode {
|
|
295
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
210
296
|
kind: Kind.SELECTION_SET;
|
|
297
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
211
298
|
loc?: Location;
|
|
299
|
+
/** Fields and fragments contained in this selection set. */
|
|
212
300
|
selections: ReadonlyArray<SelectionNode>;
|
|
213
301
|
}
|
|
302
|
+
/** Any selection that may appear inside a selection set. */
|
|
214
303
|
export declare type SelectionNode =
|
|
215
304
|
| FieldNode
|
|
216
305
|
| FragmentSpreadNode
|
|
217
306
|
| InlineFragmentNode;
|
|
307
|
+
/** A field selected in an executable GraphQL document. */
|
|
218
308
|
export interface FieldNode {
|
|
309
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
219
310
|
readonly kind: Kind.FIELD;
|
|
311
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
220
312
|
readonly loc?: Location;
|
|
313
|
+
/** The response-key alias for this field, if one was supplied. */
|
|
221
314
|
readonly alias?: NameNode;
|
|
315
|
+
/** Name node identifying this AST node. */
|
|
222
316
|
readonly name: NameNode;
|
|
317
|
+
/** Arguments supplied to this field, directive, or coordinate. */
|
|
223
318
|
readonly arguments?: ReadonlyArray<ArgumentNode>;
|
|
319
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
224
320
|
readonly directives?: ReadonlyArray<DirectiveNode>;
|
|
321
|
+
/** Selections made by this operation, field, or fragment. */
|
|
225
322
|
readonly selectionSet?: SelectionSetNode;
|
|
226
323
|
}
|
|
324
|
+
/** An argument supplied to a field or directive. */
|
|
227
325
|
export interface ArgumentNode {
|
|
326
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
228
327
|
readonly kind: Kind.ARGUMENT;
|
|
328
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
229
329
|
readonly loc?: Location;
|
|
330
|
+
/** Name node identifying this AST node. */
|
|
230
331
|
readonly name: NameNode;
|
|
332
|
+
/** Parsed value represented by this node. */
|
|
231
333
|
readonly value: ValueNode;
|
|
232
334
|
}
|
|
335
|
+
/** An argument node whose value is guaranteed to be constant. */
|
|
233
336
|
export interface ConstArgumentNode {
|
|
337
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
234
338
|
readonly kind: Kind.ARGUMENT;
|
|
339
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
235
340
|
readonly loc?: Location;
|
|
341
|
+
/** Name node identifying this AST node. */
|
|
236
342
|
readonly name: NameNode;
|
|
343
|
+
/** Parsed value represented by this node. */
|
|
237
344
|
readonly value: ConstValueNode;
|
|
238
345
|
}
|
|
239
|
-
/**
|
|
346
|
+
/** A named fragment spread, such as `...userFields`. */
|
|
240
347
|
export interface FragmentSpreadNode {
|
|
348
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
241
349
|
readonly kind: Kind.FRAGMENT_SPREAD;
|
|
350
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
242
351
|
readonly loc?: Location;
|
|
352
|
+
/** Name node identifying this AST node. */
|
|
243
353
|
readonly name: NameNode;
|
|
354
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
244
355
|
readonly directives?: ReadonlyArray<DirectiveNode>;
|
|
245
356
|
}
|
|
357
|
+
/** An inline fragment spread with an optional type condition. */
|
|
246
358
|
export interface InlineFragmentNode {
|
|
359
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
247
360
|
readonly kind: Kind.INLINE_FRAGMENT;
|
|
361
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
248
362
|
readonly loc?: Location;
|
|
363
|
+
/** The type condition that limits where this fragment applies. */
|
|
249
364
|
readonly typeCondition?: NamedTypeNode;
|
|
365
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
250
366
|
readonly directives?: ReadonlyArray<DirectiveNode>;
|
|
367
|
+
/** Selections made by this operation, field, or fragment. */
|
|
251
368
|
readonly selectionSet: SelectionSetNode;
|
|
252
369
|
}
|
|
370
|
+
/** A reusable fragment definition declared in an executable document. */
|
|
253
371
|
export interface FragmentDefinitionNode {
|
|
372
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
254
373
|
readonly kind: Kind.FRAGMENT_DEFINITION;
|
|
374
|
+
/** The optional GraphQL description associated with this definition. */
|
|
255
375
|
readonly description?: StringValueNode;
|
|
376
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
256
377
|
readonly loc?: Location;
|
|
378
|
+
/** Name node identifying this AST node. */
|
|
257
379
|
readonly name: NameNode;
|
|
258
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* Deprecated variable definitions declared by this legacy fragment
|
|
382
|
+
* definition. This legacy fragment variable syntax will be removed in v17.
|
|
383
|
+
* Move variable definitions to operations for spec-compliant documents; if
|
|
384
|
+
* you need variables or arguments scoped to fragments, v17 has a more
|
|
385
|
+
* complete experimental fragment-arguments feature.
|
|
386
|
+
* @deprecated variableDefinitions will be removed in v17.0.0
|
|
387
|
+
*/
|
|
259
388
|
readonly variableDefinitions?: ReadonlyArray<VariableDefinitionNode>;
|
|
389
|
+
/** The type condition that limits where this fragment applies. */
|
|
260
390
|
readonly typeCondition: NamedTypeNode;
|
|
391
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
261
392
|
readonly directives?: ReadonlyArray<DirectiveNode>;
|
|
393
|
+
/** Selections made by this operation, field, or fragment. */
|
|
262
394
|
readonly selectionSet: SelectionSetNode;
|
|
263
395
|
}
|
|
264
|
-
/**
|
|
396
|
+
/** Any value literal that may appear in an executable GraphQL document. */
|
|
265
397
|
export declare type ValueNode =
|
|
266
398
|
| VariableNode
|
|
267
399
|
| IntValueNode
|
|
@@ -272,6 +404,7 @@ export declare type ValueNode =
|
|
|
272
404
|
| EnumValueNode
|
|
273
405
|
| ListValueNode
|
|
274
406
|
| ObjectValueNode;
|
|
407
|
+
/** Any value literal that is guaranteed not to contain a variable reference. */
|
|
275
408
|
export declare type ConstValueNode =
|
|
276
409
|
| IntValueNode
|
|
277
410
|
| FloatValueNode
|
|
@@ -281,117 +414,199 @@ export declare type ConstValueNode =
|
|
|
281
414
|
| EnumValueNode
|
|
282
415
|
| ConstListValueNode
|
|
283
416
|
| ConstObjectValueNode;
|
|
417
|
+
/** An integer value literal. */
|
|
284
418
|
export interface IntValueNode {
|
|
419
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
285
420
|
readonly kind: Kind.INT;
|
|
421
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
286
422
|
readonly loc?: Location;
|
|
423
|
+
/** Parsed value represented by this node. */
|
|
287
424
|
readonly value: string;
|
|
288
425
|
}
|
|
426
|
+
/** A floating-point value literal. */
|
|
289
427
|
export interface FloatValueNode {
|
|
428
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
290
429
|
readonly kind: Kind.FLOAT;
|
|
430
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
291
431
|
readonly loc?: Location;
|
|
432
|
+
/** Parsed value represented by this node. */
|
|
292
433
|
readonly value: string;
|
|
293
434
|
}
|
|
435
|
+
/** A string value literal. */
|
|
294
436
|
export interface StringValueNode {
|
|
437
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
295
438
|
readonly kind: Kind.STRING;
|
|
439
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
296
440
|
readonly loc?: Location;
|
|
441
|
+
/** Parsed value represented by this node. */
|
|
297
442
|
readonly value: string;
|
|
443
|
+
/** Whether this string was parsed from block string syntax. */
|
|
298
444
|
readonly block?: boolean;
|
|
299
445
|
}
|
|
446
|
+
/** A boolean value literal. */
|
|
300
447
|
export interface BooleanValueNode {
|
|
448
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
301
449
|
readonly kind: Kind.BOOLEAN;
|
|
450
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
302
451
|
readonly loc?: Location;
|
|
452
|
+
/** Parsed value represented by this node. */
|
|
303
453
|
readonly value: boolean;
|
|
304
454
|
}
|
|
455
|
+
/** A null value literal. */
|
|
305
456
|
export interface NullValueNode {
|
|
457
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
306
458
|
readonly kind: Kind.NULL;
|
|
459
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
307
460
|
readonly loc?: Location;
|
|
308
461
|
}
|
|
462
|
+
/** An enum value literal. */
|
|
309
463
|
export interface EnumValueNode {
|
|
464
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
310
465
|
readonly kind: Kind.ENUM;
|
|
466
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
311
467
|
readonly loc?: Location;
|
|
468
|
+
/** Parsed value represented by this node. */
|
|
312
469
|
readonly value: string;
|
|
313
470
|
}
|
|
471
|
+
/** A list value literal. */
|
|
314
472
|
export interface ListValueNode {
|
|
473
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
315
474
|
readonly kind: Kind.LIST;
|
|
475
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
316
476
|
readonly loc?: Location;
|
|
477
|
+
/** Values contained in this enum, list, or input-object definition. */
|
|
317
478
|
readonly values: ReadonlyArray<ValueNode>;
|
|
318
479
|
}
|
|
480
|
+
/** A list value literal whose elements are all constant values. */
|
|
319
481
|
export interface ConstListValueNode {
|
|
482
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
320
483
|
readonly kind: Kind.LIST;
|
|
484
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
321
485
|
readonly loc?: Location;
|
|
486
|
+
/** Values contained in this enum, list, or input-object definition. */
|
|
322
487
|
readonly values: ReadonlyArray<ConstValueNode>;
|
|
323
488
|
}
|
|
489
|
+
/** An input object value literal. */
|
|
324
490
|
export interface ObjectValueNode {
|
|
491
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
325
492
|
readonly kind: Kind.OBJECT;
|
|
493
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
326
494
|
readonly loc?: Location;
|
|
495
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
327
496
|
readonly fields: ReadonlyArray<ObjectFieldNode>;
|
|
328
497
|
}
|
|
498
|
+
/** An input object value literal whose fields are all constant values. */
|
|
329
499
|
export interface ConstObjectValueNode {
|
|
500
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
330
501
|
readonly kind: Kind.OBJECT;
|
|
502
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
331
503
|
readonly loc?: Location;
|
|
504
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
332
505
|
readonly fields: ReadonlyArray<ConstObjectFieldNode>;
|
|
333
506
|
}
|
|
507
|
+
/** A field inside an input object value literal. */
|
|
334
508
|
export interface ObjectFieldNode {
|
|
509
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
335
510
|
readonly kind: Kind.OBJECT_FIELD;
|
|
511
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
336
512
|
readonly loc?: Location;
|
|
513
|
+
/** Name node identifying this AST node. */
|
|
337
514
|
readonly name: NameNode;
|
|
515
|
+
/** Parsed value represented by this node. */
|
|
338
516
|
readonly value: ValueNode;
|
|
339
517
|
}
|
|
518
|
+
/** A field inside a constant input object value literal. */
|
|
340
519
|
export interface ConstObjectFieldNode {
|
|
520
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
341
521
|
readonly kind: Kind.OBJECT_FIELD;
|
|
522
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
342
523
|
readonly loc?: Location;
|
|
524
|
+
/** Name node identifying this AST node. */
|
|
343
525
|
readonly name: NameNode;
|
|
526
|
+
/** Parsed value represented by this node. */
|
|
344
527
|
readonly value: ConstValueNode;
|
|
345
528
|
}
|
|
346
|
-
/**
|
|
529
|
+
/** A directive applied to an executable or type-system location. */
|
|
347
530
|
export interface DirectiveNode {
|
|
531
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
348
532
|
readonly kind: Kind.DIRECTIVE;
|
|
533
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
349
534
|
readonly loc?: Location;
|
|
535
|
+
/** Name node identifying this AST node. */
|
|
350
536
|
readonly name: NameNode;
|
|
537
|
+
/** Arguments supplied to this field, directive, or coordinate. */
|
|
351
538
|
readonly arguments?: ReadonlyArray<ArgumentNode>;
|
|
352
539
|
}
|
|
540
|
+
/** A directive whose arguments are all constant values. */
|
|
353
541
|
export interface ConstDirectiveNode {
|
|
542
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
354
543
|
readonly kind: Kind.DIRECTIVE;
|
|
544
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
355
545
|
readonly loc?: Location;
|
|
546
|
+
/** Name node identifying this AST node. */
|
|
356
547
|
readonly name: NameNode;
|
|
548
|
+
/** Arguments supplied to this field, directive, or coordinate. */
|
|
357
549
|
readonly arguments?: ReadonlyArray<ConstArgumentNode>;
|
|
358
550
|
}
|
|
359
|
-
/**
|
|
551
|
+
/** Any GraphQL type reference AST node. */
|
|
360
552
|
export declare type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode;
|
|
553
|
+
/** A named type reference. */
|
|
361
554
|
export interface NamedTypeNode {
|
|
555
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
362
556
|
readonly kind: Kind.NAMED_TYPE;
|
|
557
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
363
558
|
readonly loc?: Location;
|
|
559
|
+
/** Name node identifying this AST node. */
|
|
364
560
|
readonly name: NameNode;
|
|
365
561
|
}
|
|
562
|
+
/** A list type reference. */
|
|
366
563
|
export interface ListTypeNode {
|
|
564
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
367
565
|
readonly kind: Kind.LIST_TYPE;
|
|
566
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
368
567
|
readonly loc?: Location;
|
|
568
|
+
/** The GraphQL type reference or runtime type for this element. */
|
|
369
569
|
readonly type: TypeNode;
|
|
370
570
|
}
|
|
571
|
+
/** A non-null type reference. */
|
|
371
572
|
export interface NonNullTypeNode {
|
|
573
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
372
574
|
readonly kind: Kind.NON_NULL_TYPE;
|
|
575
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
373
576
|
readonly loc?: Location;
|
|
577
|
+
/** The GraphQL type reference or runtime type for this element. */
|
|
374
578
|
readonly type: NamedTypeNode | ListTypeNode;
|
|
375
579
|
}
|
|
376
|
-
/**
|
|
580
|
+
/** Any type-system definition that may appear in a schema document. */
|
|
377
581
|
export declare type TypeSystemDefinitionNode =
|
|
378
582
|
| SchemaDefinitionNode
|
|
379
583
|
| TypeDefinitionNode
|
|
380
584
|
| DirectiveDefinitionNode;
|
|
585
|
+
/** A schema definition in a type-system document. */
|
|
381
586
|
export interface SchemaDefinitionNode {
|
|
587
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
382
588
|
readonly kind: Kind.SCHEMA_DEFINITION;
|
|
589
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
383
590
|
readonly loc?: Location;
|
|
591
|
+
/** The optional GraphQL description associated with this definition. */
|
|
384
592
|
readonly description?: StringValueNode;
|
|
593
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
385
594
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
595
|
+
/** Root operation types declared by this schema definition or extension. */
|
|
386
596
|
readonly operationTypes: ReadonlyArray<OperationTypeDefinitionNode>;
|
|
387
597
|
}
|
|
598
|
+
/** A root operation type declaration inside a schema definition or extension. */
|
|
388
599
|
export interface OperationTypeDefinitionNode {
|
|
600
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
389
601
|
readonly kind: Kind.OPERATION_TYPE_DEFINITION;
|
|
602
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
390
603
|
readonly loc?: Location;
|
|
604
|
+
/** The operation selected for execution. */
|
|
391
605
|
readonly operation: OperationTypeNode;
|
|
606
|
+
/** The GraphQL type reference or runtime type for this element. */
|
|
392
607
|
readonly type: NamedTypeNode;
|
|
393
608
|
}
|
|
394
|
-
/**
|
|
609
|
+
/** Any named type definition that may appear in a schema document. */
|
|
395
610
|
export declare type TypeDefinitionNode =
|
|
396
611
|
| ScalarTypeDefinitionNode
|
|
397
612
|
| ObjectTypeDefinitionNode
|
|
@@ -399,101 +614,181 @@ export declare type TypeDefinitionNode =
|
|
|
399
614
|
| UnionTypeDefinitionNode
|
|
400
615
|
| EnumTypeDefinitionNode
|
|
401
616
|
| InputObjectTypeDefinitionNode;
|
|
617
|
+
/** A scalar type definition in a type-system document. */
|
|
402
618
|
export interface ScalarTypeDefinitionNode {
|
|
619
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
403
620
|
readonly kind: Kind.SCALAR_TYPE_DEFINITION;
|
|
621
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
404
622
|
readonly loc?: Location;
|
|
623
|
+
/** The optional GraphQL description associated with this definition. */
|
|
405
624
|
readonly description?: StringValueNode;
|
|
625
|
+
/** Name node identifying this AST node. */
|
|
406
626
|
readonly name: NameNode;
|
|
627
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
407
628
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
408
629
|
}
|
|
630
|
+
/** An object type definition in a type-system document. */
|
|
409
631
|
export interface ObjectTypeDefinitionNode {
|
|
632
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
410
633
|
readonly kind: Kind.OBJECT_TYPE_DEFINITION;
|
|
634
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
411
635
|
readonly loc?: Location;
|
|
636
|
+
/** The optional GraphQL description associated with this definition. */
|
|
412
637
|
readonly description?: StringValueNode;
|
|
638
|
+
/** Name node identifying this AST node. */
|
|
413
639
|
readonly name: NameNode;
|
|
640
|
+
/** Interfaces implemented by this object or interface type. */
|
|
414
641
|
readonly interfaces?: ReadonlyArray<NamedTypeNode>;
|
|
642
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
415
643
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
644
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
416
645
|
readonly fields?: ReadonlyArray<FieldDefinitionNode>;
|
|
417
646
|
}
|
|
647
|
+
/** A field definition declared by an object or interface type. */
|
|
418
648
|
export interface FieldDefinitionNode {
|
|
649
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
419
650
|
readonly kind: Kind.FIELD_DEFINITION;
|
|
651
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
420
652
|
readonly loc?: Location;
|
|
653
|
+
/** The optional GraphQL description associated with this definition. */
|
|
421
654
|
readonly description?: StringValueNode;
|
|
655
|
+
/** Name node identifying this AST node. */
|
|
422
656
|
readonly name: NameNode;
|
|
657
|
+
/** Arguments supplied to this field, directive, or coordinate. */
|
|
423
658
|
readonly arguments?: ReadonlyArray<InputValueDefinitionNode>;
|
|
659
|
+
/** The GraphQL type reference or runtime type for this element. */
|
|
424
660
|
readonly type: TypeNode;
|
|
661
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
425
662
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
426
663
|
}
|
|
664
|
+
/** An argument or input-field definition. */
|
|
427
665
|
export interface InputValueDefinitionNode {
|
|
666
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
428
667
|
readonly kind: Kind.INPUT_VALUE_DEFINITION;
|
|
668
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
429
669
|
readonly loc?: Location;
|
|
670
|
+
/** The optional GraphQL description associated with this definition. */
|
|
430
671
|
readonly description?: StringValueNode;
|
|
672
|
+
/** Name node identifying this AST node. */
|
|
431
673
|
readonly name: NameNode;
|
|
674
|
+
/** The GraphQL type reference or runtime type for this element. */
|
|
432
675
|
readonly type: TypeNode;
|
|
676
|
+
/** Default value used when no explicit value is supplied. */
|
|
433
677
|
readonly defaultValue?: ConstValueNode;
|
|
678
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
434
679
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
435
680
|
}
|
|
681
|
+
/** An interface type definition in a type-system document. */
|
|
436
682
|
export interface InterfaceTypeDefinitionNode {
|
|
683
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
437
684
|
readonly kind: Kind.INTERFACE_TYPE_DEFINITION;
|
|
685
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
438
686
|
readonly loc?: Location;
|
|
687
|
+
/** The optional GraphQL description associated with this definition. */
|
|
439
688
|
readonly description?: StringValueNode;
|
|
689
|
+
/** Name node identifying this AST node. */
|
|
440
690
|
readonly name: NameNode;
|
|
691
|
+
/** Interfaces implemented by this object or interface type. */
|
|
441
692
|
readonly interfaces?: ReadonlyArray<NamedTypeNode>;
|
|
693
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
442
694
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
695
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
443
696
|
readonly fields?: ReadonlyArray<FieldDefinitionNode>;
|
|
444
697
|
}
|
|
698
|
+
/** A union type definition in a type-system document. */
|
|
445
699
|
export interface UnionTypeDefinitionNode {
|
|
700
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
446
701
|
readonly kind: Kind.UNION_TYPE_DEFINITION;
|
|
702
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
447
703
|
readonly loc?: Location;
|
|
704
|
+
/** The optional GraphQL description associated with this definition. */
|
|
448
705
|
readonly description?: StringValueNode;
|
|
706
|
+
/** Name node identifying this AST node. */
|
|
449
707
|
readonly name: NameNode;
|
|
708
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
450
709
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
710
|
+
/** Object types that belong to this union type. */
|
|
451
711
|
readonly types?: ReadonlyArray<NamedTypeNode>;
|
|
452
712
|
}
|
|
713
|
+
/** An enum type definition in a type-system document. */
|
|
453
714
|
export interface EnumTypeDefinitionNode {
|
|
715
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
454
716
|
readonly kind: Kind.ENUM_TYPE_DEFINITION;
|
|
717
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
455
718
|
readonly loc?: Location;
|
|
719
|
+
/** The optional GraphQL description associated with this definition. */
|
|
456
720
|
readonly description?: StringValueNode;
|
|
721
|
+
/** Name node identifying this AST node. */
|
|
457
722
|
readonly name: NameNode;
|
|
723
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
458
724
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
725
|
+
/** Values contained in this enum, list, or input-object definition. */
|
|
459
726
|
readonly values?: ReadonlyArray<EnumValueDefinitionNode>;
|
|
460
727
|
}
|
|
728
|
+
/** An enum value definition. */
|
|
461
729
|
export interface EnumValueDefinitionNode {
|
|
730
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
462
731
|
readonly kind: Kind.ENUM_VALUE_DEFINITION;
|
|
732
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
463
733
|
readonly loc?: Location;
|
|
734
|
+
/** The optional GraphQL description associated with this definition. */
|
|
464
735
|
readonly description?: StringValueNode;
|
|
736
|
+
/** Name node identifying this AST node. */
|
|
465
737
|
readonly name: NameNode;
|
|
738
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
466
739
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
467
740
|
}
|
|
741
|
+
/** An input object type definition in a type-system document. */
|
|
468
742
|
export interface InputObjectTypeDefinitionNode {
|
|
743
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
469
744
|
readonly kind: Kind.INPUT_OBJECT_TYPE_DEFINITION;
|
|
745
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
470
746
|
readonly loc?: Location;
|
|
747
|
+
/** The optional GraphQL description associated with this definition. */
|
|
471
748
|
readonly description?: StringValueNode;
|
|
749
|
+
/** Name node identifying this AST node. */
|
|
472
750
|
readonly name: NameNode;
|
|
751
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
473
752
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
753
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
474
754
|
readonly fields?: ReadonlyArray<InputValueDefinitionNode>;
|
|
475
755
|
}
|
|
476
|
-
/**
|
|
756
|
+
/** A directive definition in a type-system document. */
|
|
477
757
|
export interface DirectiveDefinitionNode {
|
|
758
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
478
759
|
readonly kind: Kind.DIRECTIVE_DEFINITION;
|
|
760
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
479
761
|
readonly loc?: Location;
|
|
762
|
+
/** The optional GraphQL description associated with this definition. */
|
|
480
763
|
readonly description?: StringValueNode;
|
|
764
|
+
/** Name node identifying this AST node. */
|
|
481
765
|
readonly name: NameNode;
|
|
766
|
+
/** Arguments supplied to this field, directive, or coordinate. */
|
|
482
767
|
readonly arguments?: ReadonlyArray<InputValueDefinitionNode>;
|
|
768
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
769
|
+
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
770
|
+
/** Whether this directive may appear more than once at the same location. */
|
|
483
771
|
readonly repeatable: boolean;
|
|
772
|
+
/** Locations where this directive may be applied. */
|
|
484
773
|
readonly locations: ReadonlyArray<NameNode>;
|
|
485
774
|
}
|
|
486
|
-
/**
|
|
775
|
+
/** Any type-system extension that may appear in a schema extension document. */
|
|
487
776
|
export declare type TypeSystemExtensionNode =
|
|
488
777
|
| SchemaExtensionNode
|
|
489
|
-
| TypeExtensionNode
|
|
778
|
+
| TypeExtensionNode
|
|
779
|
+
| DirectiveExtensionNode;
|
|
780
|
+
/** A schema extension in a type-system document. */
|
|
490
781
|
export interface SchemaExtensionNode {
|
|
782
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
491
783
|
readonly kind: Kind.SCHEMA_EXTENSION;
|
|
784
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
492
785
|
readonly loc?: Location;
|
|
786
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
493
787
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
788
|
+
/** Root operation types declared by this schema definition or extension. */
|
|
494
789
|
readonly operationTypes?: ReadonlyArray<OperationTypeDefinitionNode>;
|
|
495
790
|
}
|
|
496
|
-
/**
|
|
791
|
+
/** Any named type extension that may appear in a schema extension document. */
|
|
497
792
|
export declare type TypeExtensionNode =
|
|
498
793
|
| ScalarTypeExtensionNode
|
|
499
794
|
| ObjectTypeExtensionNode
|
|
@@ -501,82 +796,154 @@ export declare type TypeExtensionNode =
|
|
|
501
796
|
| UnionTypeExtensionNode
|
|
502
797
|
| EnumTypeExtensionNode
|
|
503
798
|
| InputObjectTypeExtensionNode;
|
|
799
|
+
/** A scalar type extension. */
|
|
504
800
|
export interface ScalarTypeExtensionNode {
|
|
801
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
505
802
|
readonly kind: Kind.SCALAR_TYPE_EXTENSION;
|
|
803
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
506
804
|
readonly loc?: Location;
|
|
805
|
+
/** Name node identifying this AST node. */
|
|
507
806
|
readonly name: NameNode;
|
|
807
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
508
808
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
509
809
|
}
|
|
810
|
+
/** An object type extension. */
|
|
510
811
|
export interface ObjectTypeExtensionNode {
|
|
812
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
511
813
|
readonly kind: Kind.OBJECT_TYPE_EXTENSION;
|
|
814
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
512
815
|
readonly loc?: Location;
|
|
816
|
+
/** Name node identifying this AST node. */
|
|
513
817
|
readonly name: NameNode;
|
|
818
|
+
/** Interfaces implemented by this object or interface type. */
|
|
514
819
|
readonly interfaces?: ReadonlyArray<NamedTypeNode>;
|
|
820
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
515
821
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
822
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
516
823
|
readonly fields?: ReadonlyArray<FieldDefinitionNode>;
|
|
517
824
|
}
|
|
825
|
+
/** An interface type extension. */
|
|
518
826
|
export interface InterfaceTypeExtensionNode {
|
|
827
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
519
828
|
readonly kind: Kind.INTERFACE_TYPE_EXTENSION;
|
|
829
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
520
830
|
readonly loc?: Location;
|
|
831
|
+
/** Name node identifying this AST node. */
|
|
521
832
|
readonly name: NameNode;
|
|
833
|
+
/** Interfaces implemented by this object or interface type. */
|
|
522
834
|
readonly interfaces?: ReadonlyArray<NamedTypeNode>;
|
|
835
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
523
836
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
837
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
524
838
|
readonly fields?: ReadonlyArray<FieldDefinitionNode>;
|
|
525
839
|
}
|
|
840
|
+
/** A union type extension. */
|
|
526
841
|
export interface UnionTypeExtensionNode {
|
|
842
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
527
843
|
readonly kind: Kind.UNION_TYPE_EXTENSION;
|
|
844
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
528
845
|
readonly loc?: Location;
|
|
846
|
+
/** Name node identifying this AST node. */
|
|
529
847
|
readonly name: NameNode;
|
|
848
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
530
849
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
850
|
+
/** Object types that belong to this union type. */
|
|
531
851
|
readonly types?: ReadonlyArray<NamedTypeNode>;
|
|
532
852
|
}
|
|
853
|
+
/** An enum type extension. */
|
|
533
854
|
export interface EnumTypeExtensionNode {
|
|
855
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
534
856
|
readonly kind: Kind.ENUM_TYPE_EXTENSION;
|
|
857
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
535
858
|
readonly loc?: Location;
|
|
859
|
+
/** Name node identifying this AST node. */
|
|
536
860
|
readonly name: NameNode;
|
|
861
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
537
862
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
863
|
+
/** Values contained in this enum, list, or input-object definition. */
|
|
538
864
|
readonly values?: ReadonlyArray<EnumValueDefinitionNode>;
|
|
539
865
|
}
|
|
866
|
+
/** An input object type extension. */
|
|
540
867
|
export interface InputObjectTypeExtensionNode {
|
|
868
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
541
869
|
readonly kind: Kind.INPUT_OBJECT_TYPE_EXTENSION;
|
|
870
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
542
871
|
readonly loc?: Location;
|
|
872
|
+
/** Name node identifying this AST node. */
|
|
543
873
|
readonly name: NameNode;
|
|
874
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
544
875
|
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
876
|
+
/** Fields declared by this object, interface, input object, or literal. */
|
|
545
877
|
readonly fields?: ReadonlyArray<InputValueDefinitionNode>;
|
|
546
878
|
}
|
|
547
|
-
/**
|
|
879
|
+
/** A directive extension. */
|
|
880
|
+
export interface DirectiveExtensionNode {
|
|
881
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
882
|
+
readonly kind: Kind.DIRECTIVE_EXTENSION;
|
|
883
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
884
|
+
readonly loc?: Location;
|
|
885
|
+
/** Name node identifying this AST node. */
|
|
886
|
+
readonly name: NameNode;
|
|
887
|
+
/** Directives available in this schema or applied to this AST node. */
|
|
888
|
+
readonly directives?: ReadonlyArray<ConstDirectiveNode>;
|
|
889
|
+
}
|
|
890
|
+
/** Any AST node representing a GraphQL schema coordinate. */
|
|
548
891
|
export declare type SchemaCoordinateNode =
|
|
549
892
|
| TypeCoordinateNode
|
|
550
893
|
| MemberCoordinateNode
|
|
551
894
|
| ArgumentCoordinateNode
|
|
552
895
|
| DirectiveCoordinateNode
|
|
553
896
|
| DirectiveArgumentCoordinateNode;
|
|
897
|
+
/** A schema coordinate that refers to a named type. */
|
|
554
898
|
export interface TypeCoordinateNode {
|
|
899
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
555
900
|
readonly kind: Kind.TYPE_COORDINATE;
|
|
901
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
556
902
|
readonly loc?: Location;
|
|
903
|
+
/** Name node identifying this AST node. */
|
|
557
904
|
readonly name: NameNode;
|
|
558
905
|
}
|
|
906
|
+
/** A schema coordinate that refers to a member of a named type. */
|
|
559
907
|
export interface MemberCoordinateNode {
|
|
908
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
560
909
|
readonly kind: Kind.MEMBER_COORDINATE;
|
|
910
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
561
911
|
readonly loc?: Location;
|
|
912
|
+
/** Name node identifying this AST node. */
|
|
562
913
|
readonly name: NameNode;
|
|
914
|
+
/** The member name referenced by this schema coordinate. */
|
|
563
915
|
readonly memberName: NameNode;
|
|
564
916
|
}
|
|
917
|
+
/** A schema coordinate that refers to a field or directive argument. */
|
|
565
918
|
export interface ArgumentCoordinateNode {
|
|
919
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
566
920
|
readonly kind: Kind.ARGUMENT_COORDINATE;
|
|
921
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
567
922
|
readonly loc?: Location;
|
|
923
|
+
/** Name node identifying this AST node. */
|
|
568
924
|
readonly name: NameNode;
|
|
925
|
+
/** The field name referenced by this schema coordinate. */
|
|
569
926
|
readonly fieldName: NameNode;
|
|
927
|
+
/** The argument name referenced by this schema coordinate. */
|
|
570
928
|
readonly argumentName: NameNode;
|
|
571
929
|
}
|
|
930
|
+
/** A schema coordinate that refers to a directive. */
|
|
572
931
|
export interface DirectiveCoordinateNode {
|
|
932
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
573
933
|
readonly kind: Kind.DIRECTIVE_COORDINATE;
|
|
934
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
574
935
|
readonly loc?: Location;
|
|
936
|
+
/** Name node identifying this AST node. */
|
|
575
937
|
readonly name: NameNode;
|
|
576
938
|
}
|
|
939
|
+
/** A schema coordinate that refers to a directive argument. */
|
|
577
940
|
export interface DirectiveArgumentCoordinateNode {
|
|
941
|
+
/** The discriminator identifying the concrete AST or introspection kind. */
|
|
578
942
|
readonly kind: Kind.DIRECTIVE_ARGUMENT_COORDINATE;
|
|
943
|
+
/** The source location for this AST node, if location tracking was enabled. */
|
|
579
944
|
readonly loc?: Location;
|
|
945
|
+
/** Name node identifying this AST node. */
|
|
580
946
|
readonly name: NameNode;
|
|
947
|
+
/** The argument name referenced by this schema coordinate. */
|
|
581
948
|
readonly argumentName: NameNode;
|
|
582
949
|
}
|