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