graphql 0.0.1-test.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/LICENSE +21 -0
- package/NotSupportedTSVersion.d.ts +1 -0
- package/README.md +158 -0
- package/error/GraphQLError.d.ts +142 -0
- package/error/GraphQLError.js +267 -0
- package/error/GraphQLError.mjs +253 -0
- package/error/index.d.ts +7 -0
- package/error/index.js +41 -0
- package/error/index.mjs +3 -0
- package/error/locatedError.d.ts +13 -0
- package/error/locatedError.js +40 -0
- package/error/locatedError.mjs +32 -0
- package/error/syntaxError.d.ts +11 -0
- package/error/syntaxError.js +21 -0
- package/error/syntaxError.mjs +11 -0
- package/execution/collectFields.d.ts +45 -0
- package/execution/collectFields.js +229 -0
- package/execution/collectFields.mjs +213 -0
- package/execution/execute.d.ts +185 -0
- package/execution/execute.js +1016 -0
- package/execution/execute.mjs +988 -0
- package/execution/index.d.ts +14 -0
- package/execution/index.js +67 -0
- package/execution/index.mjs +9 -0
- package/execution/mapAsyncIterator.d.ts +9 -0
- package/execution/mapAsyncIterator.js +68 -0
- package/execution/mapAsyncIterator.mjs +61 -0
- package/execution/subscribe.d.ts +68 -0
- package/execution/subscribe.js +261 -0
- package/execution/subscribe.mjs +239 -0
- package/execution/values.d.ts +81 -0
- package/execution/values.js +292 -0
- package/execution/values.mjs +255 -0
- package/graphql.d.ts +67 -0
- package/graphql.js +96 -0
- package/graphql.mjs +122 -0
- package/index.d.ts +411 -0
- package/index.js +1263 -0
- package/index.mjs +254 -0
- package/jsutils/Maybe.d.ts +2 -0
- package/jsutils/Maybe.js +5 -0
- package/jsutils/Maybe.mjs +1 -0
- package/jsutils/ObjMap.d.ts +16 -0
- package/jsutils/ObjMap.js +5 -0
- package/jsutils/ObjMap.mjs +1 -0
- package/jsutils/Path.d.ts +20 -0
- package/jsutils/Path.js +33 -0
- package/jsutils/Path.mjs +25 -0
- package/jsutils/PromiseOrValue.d.ts +1 -0
- package/jsutils/PromiseOrValue.js +5 -0
- package/jsutils/PromiseOrValue.mjs +1 -0
- package/jsutils/devAssert.d.ts +1 -0
- package/jsutils/devAssert.js +14 -0
- package/jsutils/devAssert.mjs +7 -0
- package/jsutils/didYouMean.d.ts +8 -0
- package/jsutils/didYouMean.js +38 -0
- package/jsutils/didYouMean.mjs +32 -0
- package/jsutils/groupBy.d.ts +7 -0
- package/jsutils/groupBy.js +26 -0
- package/jsutils/groupBy.mjs +19 -0
- package/jsutils/identityFunc.d.ts +4 -0
- package/jsutils/identityFunc.js +13 -0
- package/jsutils/identityFunc.mjs +6 -0
- package/jsutils/inspect.d.ts +4 -0
- package/jsutils/inspect.js +121 -0
- package/jsutils/inspect.mjs +115 -0
- package/jsutils/instanceOf.d.ts +16 -0
- package/jsutils/instanceOf.js +60 -0
- package/jsutils/instanceOf.mjs +52 -0
- package/jsutils/invariant.d.ts +4 -0
- package/jsutils/invariant.js +16 -0
- package/jsutils/invariant.mjs +9 -0
- package/jsutils/isAsyncIterable.d.ts +7 -0
- package/jsutils/isAsyncIterable.js +18 -0
- package/jsutils/isAsyncIterable.mjs +11 -0
- package/jsutils/isIterableObject.d.ts +20 -0
- package/jsutils/isIterableObject.js +32 -0
- package/jsutils/isIterableObject.mjs +25 -0
- package/jsutils/isObjectLike.d.ts +7 -0
- package/jsutils/isObjectLike.js +14 -0
- package/jsutils/isObjectLike.mjs +7 -0
- package/jsutils/isPromise.d.ts +5 -0
- package/jsutils/isPromise.js +17 -0
- package/jsutils/isPromise.mjs +10 -0
- package/jsutils/keyMap.d.ts +32 -0
- package/jsutils/keyMap.js +43 -0
- package/jsutils/keyMap.mjs +36 -0
- package/jsutils/keyValMap.d.ts +23 -0
- package/jsutils/keyValMap.js +33 -0
- package/jsutils/keyValMap.mjs +26 -0
- package/jsutils/mapValue.d.ts +9 -0
- package/jsutils/mapValue.js +20 -0
- package/jsutils/mapValue.mjs +13 -0
- package/jsutils/memoize3.d.ts +9 -0
- package/jsutils/memoize3.js +41 -0
- package/jsutils/memoize3.mjs +34 -0
- package/jsutils/naturalCompare.d.ts +8 -0
- package/jsutils/naturalCompare.js +69 -0
- package/jsutils/naturalCompare.mjs +61 -0
- package/jsutils/printPathArray.d.ts +6 -0
- package/jsutils/printPathArray.js +17 -0
- package/jsutils/printPathArray.mjs +10 -0
- package/jsutils/promiseForObject.d.ts +11 -0
- package/jsutils/promiseForObject.js +25 -0
- package/jsutils/promiseForObject.mjs +18 -0
- package/jsutils/promiseReduce.d.ts +13 -0
- package/jsutils/promiseReduce.js +27 -0
- package/jsutils/promiseReduce.mjs +20 -0
- package/jsutils/suggestionList.d.ts +8 -0
- package/jsutils/suggestionList.js +139 -0
- package/jsutils/suggestionList.mjs +130 -0
- package/jsutils/toError.d.ts +4 -0
- package/jsutils/toError.js +25 -0
- package/jsutils/toError.mjs +18 -0
- package/jsutils/toObjMap.d.ts +5 -0
- package/jsutils/toObjMap.js +24 -0
- package/jsutils/toObjMap.mjs +17 -0
- package/language/ast.d.ts +536 -0
- package/language/ast.js +224 -0
- package/language/ast.mjs +206 -0
- package/language/blockString.d.ts +28 -0
- package/language/blockString.js +195 -0
- package/language/blockString.mjs +178 -0
- package/language/characterClasses.d.ts +47 -0
- package/language/characterClasses.js +75 -0
- package/language/characterClasses.mjs +64 -0
- package/language/directiveLocation.d.ts +32 -0
- package/language/directiveLocation.js +40 -0
- package/language/directiveLocation.mjs +31 -0
- package/language/index.d.ts +97 -0
- package/language/index.js +215 -0
- package/language/index.mjs +29 -0
- package/language/kinds.d.ts +65 -0
- package/language/kinds.js +64 -0
- package/language/kinds.mjs +55 -0
- package/language/lexer.d.ts +45 -0
- package/language/lexer.js +1006 -0
- package/language/lexer.mjs +902 -0
- package/language/location.d.ts +16 -0
- package/language/location.js +38 -0
- package/language/location.mjs +30 -0
- package/language/parser.d.ts +554 -0
- package/language/parser.js +1567 -0
- package/language/parser.mjs +1524 -0
- package/language/predicates.d.ts +33 -0
- package/language/predicates.js +109 -0
- package/language/predicates.mjs +81 -0
- package/language/printLocation.d.ts +14 -0
- package/language/printLocation.js +74 -0
- package/language/printLocation.mjs +66 -0
- package/language/printString.d.ts +5 -0
- package/language/printString.js +183 -0
- package/language/printString.mjs +176 -0
- package/language/printer.d.ts +6 -0
- package/language/printer.js +351 -0
- package/language/printer.mjs +339 -0
- package/language/source.d.ts +25 -0
- package/language/source.js +65 -0
- package/language/source.mjs +50 -0
- package/language/tokenKind.d.ts +34 -0
- package/language/tokenKind.js +44 -0
- package/language/tokenKind.mjs +35 -0
- package/language/visitor.d.ts +194 -0
- package/language/visitor.js +377 -0
- package/language/visitor.mjs +361 -0
- package/package.json +40 -0
- package/subscription/index.d.ts +19 -0
- package/subscription/index.js +19 -0
- package/subscription/index.mjs +19 -0
- package/type/assertName.d.ts +10 -0
- package/type/assertName.js +59 -0
- package/type/assertName.mjs +44 -0
- package/type/definition.d.ts +917 -0
- package/type/definition.js +1329 -0
- package/type/definition.mjs +1167 -0
- package/type/directives.d.ts +86 -0
- package/type/directives.js +224 -0
- package/type/directives.mjs +190 -0
- package/type/index.d.ts +150 -0
- package/type/index.js +547 -0
- package/type/index.mjs +103 -0
- package/type/introspection.d.ts +29 -0
- package/type/introspection.js +617 -0
- package/type/introspection.mjs +550 -0
- package/type/scalars.d.ts +19 -0
- package/type/scalars.js +359 -0
- package/type/scalars.mjs +299 -0
- package/type/schema.d.ts +170 -0
- package/type/schema.js +402 -0
- package/type/schema.mjs +381 -0
- package/type/validate.d.ts +17 -0
- package/type/validate.js +672 -0
- package/type/validate.mjs +647 -0
- package/utilities/TypeInfo.d.ts +67 -0
- package/utilities/TypeInfo.js +418 -0
- package/utilities/TypeInfo.mjs +395 -0
- package/utilities/assertValidName.d.ts +13 -0
- package/utilities/assertValidName.js +51 -0
- package/utilities/assertValidName.mjs +40 -0
- package/utilities/astFromValue.d.ts +28 -0
- package/utilities/astFromValue.js +190 -0
- package/utilities/astFromValue.mjs +177 -0
- package/utilities/buildASTSchema.d.ts +35 -0
- package/utilities/buildASTSchema.js +115 -0
- package/utilities/buildASTSchema.mjs +97 -0
- package/utilities/buildClientSchema.d.ts +19 -0
- package/utilities/buildClientSchema.js +386 -0
- package/utilities/buildClientSchema.mjs +363 -0
- package/utilities/coerceInputValue.d.ts +16 -0
- package/utilities/coerceInputValue.js +191 -0
- package/utilities/coerceInputValue.mjs +172 -0
- package/utilities/concatAST.d.ts +9 -0
- package/utilities/concatAST.js +26 -0
- package/utilities/concatAST.mjs +19 -0
- package/utilities/extendSchema.d.ts +40 -0
- package/utilities/extendSchema.js +798 -0
- package/utilities/extendSchema.mjs +789 -0
- package/utilities/findBreakingChanges.d.ts +51 -0
- package/utilities/findBreakingChanges.js +547 -0
- package/utilities/findBreakingChanges.mjs +516 -0
- package/utilities/getIntrospectionQuery.d.ts +182 -0
- package/utilities/getIntrospectionQuery.js +134 -0
- package/utilities/getIntrospectionQuery.mjs +127 -0
- package/utilities/getOperationAST.d.ts +11 -0
- package/utilities/getOperationAST.js +43 -0
- package/utilities/getOperationAST.mjs +36 -0
- package/utilities/getOperationRootType.d.ts +15 -0
- package/utilities/getOperationRootType.js +59 -0
- package/utilities/getOperationRootType.mjs +52 -0
- package/utilities/index.d.ts +61 -0
- package/utilities/index.js +233 -0
- package/utilities/index.mjs +55 -0
- package/utilities/introspectionFromSchema.d.ts +18 -0
- package/utilities/introspectionFromSchema.js +42 -0
- package/utilities/introspectionFromSchema.mjs +30 -0
- package/utilities/lexicographicSortSchema.d.ts +9 -0
- package/utilities/lexicographicSortSchema.js +177 -0
- package/utilities/lexicographicSortSchema.mjs +172 -0
- package/utilities/printSchema.d.ts +5 -0
- package/utilities/printSchema.js +333 -0
- package/utilities/printSchema.mjs +309 -0
- package/utilities/separateOperations.d.ts +11 -0
- package/utilities/separateOperations.js +88 -0
- package/utilities/separateOperations.mjs +80 -0
- package/utilities/sortValueNode.d.ts +9 -0
- package/utilities/sortValueNode.js +47 -0
- package/utilities/sortValueNode.mjs +39 -0
- package/utilities/stripIgnoredCharacters.d.ts +62 -0
- package/utilities/stripIgnoredCharacters.js +121 -0
- package/utilities/stripIgnoredCharacters.mjs +104 -0
- package/utilities/typeComparators.d.ts +32 -0
- package/utilities/typeComparators.js +116 -0
- package/utilities/typeComparators.mjs +106 -0
- package/utilities/typeFromAST.d.ts +32 -0
- package/utilities/typeFromAST.js +27 -0
- package/utilities/typeFromAST.mjs +18 -0
- package/utilities/typedQueryDocumentNode.d.ts +22 -0
- package/utilities/typedQueryDocumentNode.js +5 -0
- package/utilities/typedQueryDocumentNode.mjs +1 -0
- package/utilities/valueFromAST.d.ts +29 -0
- package/utilities/valueFromAST.js +185 -0
- package/utilities/valueFromAST.mjs +172 -0
- package/utilities/valueFromASTUntyped.d.ts +23 -0
- package/utilities/valueFromASTUntyped.js +61 -0
- package/utilities/valueFromASTUntyped.mjs +53 -0
- package/validation/ValidationContext.d.ts +95 -0
- package/validation/ValidationContext.js +232 -0
- package/validation/ValidationContext.mjs +212 -0
- package/validation/index.d.ts +40 -0
- package/validation/index.js +317 -0
- package/validation/index.mjs +68 -0
- package/validation/rules/ExecutableDefinitionsRule.d.ts +13 -0
- package/validation/rules/ExecutableDefinitionsRule.js +44 -0
- package/validation/rules/ExecutableDefinitionsRule.mjs +35 -0
- package/validation/rules/FieldsOnCorrectTypeRule.d.ts +13 -0
- package/validation/rules/FieldsOnCorrectTypeRule.js +143 -0
- package/validation/rules/FieldsOnCorrectTypeRule.mjs +125 -0
- package/validation/rules/FragmentsOnCompositeTypesRule.d.ts +14 -0
- package/validation/rules/FragmentsOnCompositeTypesRule.js +65 -0
- package/validation/rules/FragmentsOnCompositeTypesRule.mjs +49 -0
- package/validation/rules/KnownArgumentNamesRule.d.ts +23 -0
- package/validation/rules/KnownArgumentNamesRule.js +116 -0
- package/validation/rules/KnownArgumentNamesRule.mjs +98 -0
- package/validation/rules/KnownDirectivesRule.d.ts +16 -0
- package/validation/rules/KnownDirectivesRule.js +163 -0
- package/validation/rules/KnownDirectivesRule.mjs +146 -0
- package/validation/rules/KnownFragmentNamesRule.d.ts +13 -0
- package/validation/rules/KnownFragmentNamesRule.js +34 -0
- package/validation/rules/KnownFragmentNamesRule.mjs +24 -0
- package/validation/rules/KnownTypeNamesRule.d.ts +16 -0
- package/validation/rules/KnownTypeNamesRule.js +87 -0
- package/validation/rules/KnownTypeNamesRule.mjs +75 -0
- package/validation/rules/LoneAnonymousOperationRule.d.ts +13 -0
- package/validation/rules/LoneAnonymousOperationRule.js +40 -0
- package/validation/rules/LoneAnonymousOperationRule.mjs +32 -0
- package/validation/rules/LoneSchemaDefinitionRule.d.ts +10 -0
- package/validation/rules/LoneSchemaDefinitionRule.js +63 -0
- package/validation/rules/LoneSchemaDefinitionRule.mjs +53 -0
- package/validation/rules/NoFragmentCyclesRule.d.ts +13 -0
- package/validation/rules/NoFragmentCyclesRule.js +83 -0
- package/validation/rules/NoFragmentCyclesRule.mjs +76 -0
- package/validation/rules/NoUndefinedVariablesRule.d.ts +13 -0
- package/validation/rules/NoUndefinedVariablesRule.js +50 -0
- package/validation/rules/NoUndefinedVariablesRule.mjs +43 -0
- package/validation/rules/NoUnusedFragmentsRule.d.ts +13 -0
- package/validation/rules/NoUnusedFragmentsRule.js +59 -0
- package/validation/rules/NoUnusedFragmentsRule.mjs +52 -0
- package/validation/rules/NoUnusedVariablesRule.d.ts +13 -0
- package/validation/rules/NoUnusedVariablesRule.js +55 -0
- package/validation/rules/NoUnusedVariablesRule.mjs +48 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule-old.js +805 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule-old.mjs +788 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +14 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule.js +805 -0
- package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +788 -0
- package/validation/rules/PossibleFragmentSpreadsRule.d.ts +12 -0
- package/validation/rules/PossibleFragmentSpreadsRule.js +91 -0
- package/validation/rules/PossibleFragmentSpreadsRule.mjs +69 -0
- package/validation/rules/PossibleTypeExtensionsRule.d.ts +10 -0
- package/validation/rules/PossibleTypeExtensionsRule.js +167 -0
- package/validation/rules/PossibleTypeExtensionsRule.mjs +147 -0
- package/validation/rules/ProvidedRequiredArgumentsRule.d.ts +20 -0
- package/validation/rules/ProvidedRequiredArgumentsRule.js +158 -0
- package/validation/rules/ProvidedRequiredArgumentsRule.mjs +138 -0
- package/validation/rules/ScalarLeafsRule.d.ts +9 -0
- package/validation/rules/ScalarLeafsRule.js +51 -0
- package/validation/rules/ScalarLeafsRule.mjs +42 -0
- package/validation/rules/SingleFieldSubscriptionsRule.d.ts +13 -0
- package/validation/rules/SingleFieldSubscriptionsRule.js +82 -0
- package/validation/rules/SingleFieldSubscriptionsRule.mjs +73 -0
- package/validation/rules/UniqueArgumentDefinitionNamesRule.d.ts +11 -0
- package/validation/rules/UniqueArgumentDefinitionNamesRule.js +90 -0
- package/validation/rules/UniqueArgumentDefinitionNamesRule.mjs +79 -0
- package/validation/rules/UniqueArgumentNamesRule.d.ts +13 -0
- package/validation/rules/UniqueArgumentNamesRule.js +53 -0
- package/validation/rules/UniqueArgumentNamesRule.mjs +42 -0
- package/validation/rules/UniqueDirectiveNamesRule.d.ts +10 -0
- package/validation/rules/UniqueDirectiveNamesRule.js +50 -0
- package/validation/rules/UniqueDirectiveNamesRule.mjs +43 -0
- package/validation/rules/UniqueDirectivesPerLocationRule.d.ts +16 -0
- package/validation/rules/UniqueDirectivesPerLocationRule.js +93 -0
- package/validation/rules/UniqueDirectivesPerLocationRule.mjs +83 -0
- package/validation/rules/UniqueEnumValueNamesRule.d.ts +10 -0
- package/validation/rules/UniqueEnumValueNamesRule.js +71 -0
- package/validation/rules/UniqueEnumValueNamesRule.mjs +60 -0
- package/validation/rules/UniqueFieldDefinitionNamesRule.d.ts +10 -0
- package/validation/rules/UniqueFieldDefinitionNamesRule.js +83 -0
- package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +75 -0
- package/validation/rules/UniqueFragmentNamesRule.d.ts +12 -0
- package/validation/rules/UniqueFragmentNamesRule.js +39 -0
- package/validation/rules/UniqueFragmentNamesRule.mjs +32 -0
- package/validation/rules/UniqueInputFieldNamesRule.d.ts +13 -0
- package/validation/rules/UniqueInputFieldNamesRule.js +52 -0
- package/validation/rules/UniqueInputFieldNamesRule.mjs +44 -0
- package/validation/rules/UniqueOperationNamesRule.d.ts +12 -0
- package/validation/rules/UniqueOperationNamesRule.js +41 -0
- package/validation/rules/UniqueOperationNamesRule.mjs +34 -0
- package/validation/rules/UniqueOperationTypesRule.d.ts +10 -0
- package/validation/rules/UniqueOperationTypesRule.js +67 -0
- package/validation/rules/UniqueOperationTypesRule.mjs +60 -0
- package/validation/rules/UniqueTypeNamesRule.d.ts +10 -0
- package/validation/rules/UniqueTypeNamesRule.js +53 -0
- package/validation/rules/UniqueTypeNamesRule.mjs +46 -0
- package/validation/rules/UniqueVariableNamesRule.d.ts +10 -0
- package/validation/rules/UniqueVariableNamesRule.js +47 -0
- package/validation/rules/UniqueVariableNamesRule.mjs +39 -0
- package/validation/rules/ValuesOfCorrectTypeRule.d.ts +13 -0
- package/validation/rules/ValuesOfCorrectTypeRule.js +183 -0
- package/validation/rules/ValuesOfCorrectTypeRule.mjs +164 -0
- package/validation/rules/VariablesAreInputTypesRule.d.ts +13 -0
- package/validation/rules/VariablesAreInputTypesRule.js +44 -0
- package/validation/rules/VariablesAreInputTypesRule.mjs +31 -0
- package/validation/rules/VariablesInAllowedPositionRule.d.ts +12 -0
- package/validation/rules/VariablesInAllowedPositionRule.js +114 -0
- package/validation/rules/VariablesInAllowedPositionRule.mjs +95 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.d.ts +15 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.js +121 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.mjs +107 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +15 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +39 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +30 -0
- package/validation/specifiedRules.d.ts +12 -0
- package/validation/specifiedRules.js +160 -0
- package/validation/specifiedRules.mjs +123 -0
- package/validation/validate.d.ts +61 -0
- package/validation/validate.js +151 -0
- package/validation/validate.mjs +133 -0
- package/version.d.ts +13 -0
- package/version.js +25 -0
- package/version.mjs +17 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { Maybe } from '../jsutils/Maybe';
|
|
2
|
+
import type { DirectiveDefinitionNode } from '../language/ast';
|
|
3
|
+
import { DirectiveLocation } from '../language/directiveLocation';
|
|
4
|
+
import type {
|
|
5
|
+
GraphQLArgument,
|
|
6
|
+
GraphQLFieldConfigArgumentMap,
|
|
7
|
+
} from './definition';
|
|
8
|
+
/**
|
|
9
|
+
* Test if the given value is a GraphQL directive.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isDirective(
|
|
12
|
+
directive: unknown,
|
|
13
|
+
): directive is GraphQLDirective;
|
|
14
|
+
export declare function assertDirective(directive: unknown): GraphQLDirective;
|
|
15
|
+
/**
|
|
16
|
+
* Custom extensions
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
20
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
21
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
22
|
+
* an object which can contain all the values you need.
|
|
23
|
+
*/
|
|
24
|
+
export interface GraphQLDirectiveExtensions {
|
|
25
|
+
[attributeName: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Directives are used by the GraphQL runtime as a way of modifying execution
|
|
29
|
+
* behavior. Type system creators will usually not create these directly.
|
|
30
|
+
*/
|
|
31
|
+
export declare class GraphQLDirective {
|
|
32
|
+
name: string;
|
|
33
|
+
description: Maybe<string>;
|
|
34
|
+
locations: ReadonlyArray<DirectiveLocation>;
|
|
35
|
+
args: ReadonlyArray<GraphQLArgument>;
|
|
36
|
+
isRepeatable: boolean;
|
|
37
|
+
extensions: Readonly<GraphQLDirectiveExtensions>;
|
|
38
|
+
astNode: Maybe<DirectiveDefinitionNode>;
|
|
39
|
+
constructor(config: Readonly<GraphQLDirectiveConfig>);
|
|
40
|
+
get [Symbol.toStringTag](): string;
|
|
41
|
+
toConfig(): GraphQLDirectiveNormalizedConfig;
|
|
42
|
+
toString(): string;
|
|
43
|
+
toJSON(): string;
|
|
44
|
+
}
|
|
45
|
+
export interface GraphQLDirectiveConfig {
|
|
46
|
+
name: string;
|
|
47
|
+
description?: Maybe<string>;
|
|
48
|
+
locations: ReadonlyArray<DirectiveLocation>;
|
|
49
|
+
args?: Maybe<GraphQLFieldConfigArgumentMap>;
|
|
50
|
+
isRepeatable?: Maybe<boolean>;
|
|
51
|
+
extensions?: Maybe<Readonly<GraphQLDirectiveExtensions>>;
|
|
52
|
+
astNode?: Maybe<DirectiveDefinitionNode>;
|
|
53
|
+
}
|
|
54
|
+
interface GraphQLDirectiveNormalizedConfig extends GraphQLDirectiveConfig {
|
|
55
|
+
args: GraphQLFieldConfigArgumentMap;
|
|
56
|
+
isRepeatable: boolean;
|
|
57
|
+
extensions: Readonly<GraphQLDirectiveExtensions>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Used to conditionally include fields or fragments.
|
|
61
|
+
*/
|
|
62
|
+
export declare const GraphQLIncludeDirective: GraphQLDirective;
|
|
63
|
+
/**
|
|
64
|
+
* Used to conditionally skip (exclude) fields or fragments.
|
|
65
|
+
*/
|
|
66
|
+
export declare const GraphQLSkipDirective: GraphQLDirective;
|
|
67
|
+
/**
|
|
68
|
+
* Constant string used for default reason for a deprecation.
|
|
69
|
+
*/
|
|
70
|
+
export declare const DEFAULT_DEPRECATION_REASON = 'No longer supported';
|
|
71
|
+
/**
|
|
72
|
+
* Used to declare element of a GraphQL schema as deprecated.
|
|
73
|
+
*/
|
|
74
|
+
export declare const GraphQLDeprecatedDirective: GraphQLDirective;
|
|
75
|
+
/**
|
|
76
|
+
* Used to provide a URL for specifying the behavior of custom scalar definitions.
|
|
77
|
+
*/
|
|
78
|
+
export declare const GraphQLSpecifiedByDirective: GraphQLDirective;
|
|
79
|
+
/**
|
|
80
|
+
* The full list of specified directives.
|
|
81
|
+
*/
|
|
82
|
+
export declare const specifiedDirectives: ReadonlyArray<GraphQLDirective>;
|
|
83
|
+
export declare function isSpecifiedDirective(
|
|
84
|
+
directive: GraphQLDirective,
|
|
85
|
+
): boolean;
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.GraphQLSpecifiedByDirective =
|
|
7
|
+
exports.GraphQLSkipDirective =
|
|
8
|
+
exports.GraphQLIncludeDirective =
|
|
9
|
+
exports.GraphQLDirective =
|
|
10
|
+
exports.GraphQLDeprecatedDirective =
|
|
11
|
+
exports.DEFAULT_DEPRECATION_REASON =
|
|
12
|
+
void 0;
|
|
13
|
+
exports.assertDirective = assertDirective;
|
|
14
|
+
exports.isDirective = isDirective;
|
|
15
|
+
exports.isSpecifiedDirective = isSpecifiedDirective;
|
|
16
|
+
exports.specifiedDirectives = void 0;
|
|
17
|
+
|
|
18
|
+
var _devAssert = require('../jsutils/devAssert.js');
|
|
19
|
+
|
|
20
|
+
var _inspect = require('../jsutils/inspect.js');
|
|
21
|
+
|
|
22
|
+
var _instanceOf = require('../jsutils/instanceOf.js');
|
|
23
|
+
|
|
24
|
+
var _isObjectLike = require('../jsutils/isObjectLike.js');
|
|
25
|
+
|
|
26
|
+
var _toObjMap = require('../jsutils/toObjMap.js');
|
|
27
|
+
|
|
28
|
+
var _directiveLocation = require('../language/directiveLocation.js');
|
|
29
|
+
|
|
30
|
+
var _assertName = require('./assertName.js');
|
|
31
|
+
|
|
32
|
+
var _definition = require('./definition.js');
|
|
33
|
+
|
|
34
|
+
var _scalars = require('./scalars.js');
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Test if the given value is a GraphQL directive.
|
|
38
|
+
*/
|
|
39
|
+
function isDirective(directive) {
|
|
40
|
+
return (0, _instanceOf.instanceOf)(directive, GraphQLDirective);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function assertDirective(directive) {
|
|
44
|
+
if (!isDirective(directive)) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
`Expected ${(0, _inspect.inspect)(directive)} to be a GraphQL directive.`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return directive;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Custom extensions
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
57
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
58
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
59
|
+
* an object which can contain all the values you need.
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Directives are used by the GraphQL runtime as a way of modifying execution
|
|
64
|
+
* behavior. Type system creators will usually not create these directly.
|
|
65
|
+
*/
|
|
66
|
+
class GraphQLDirective {
|
|
67
|
+
constructor(config) {
|
|
68
|
+
var _config$isRepeatable, _config$args;
|
|
69
|
+
|
|
70
|
+
this.name = (0, _assertName.assertName)(config.name);
|
|
71
|
+
this.description = config.description;
|
|
72
|
+
this.locations = config.locations;
|
|
73
|
+
this.isRepeatable =
|
|
74
|
+
(_config$isRepeatable = config.isRepeatable) !== null &&
|
|
75
|
+
_config$isRepeatable !== void 0
|
|
76
|
+
? _config$isRepeatable
|
|
77
|
+
: false;
|
|
78
|
+
this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
|
|
79
|
+
this.astNode = config.astNode;
|
|
80
|
+
Array.isArray(config.locations) ||
|
|
81
|
+
(0, _devAssert.devAssert)(
|
|
82
|
+
false,
|
|
83
|
+
`@${config.name} locations must be an Array.`,
|
|
84
|
+
);
|
|
85
|
+
const args =
|
|
86
|
+
(_config$args = config.args) !== null && _config$args !== void 0
|
|
87
|
+
? _config$args
|
|
88
|
+
: {};
|
|
89
|
+
((0, _isObjectLike.isObjectLike)(args) && !Array.isArray(args)) ||
|
|
90
|
+
(0, _devAssert.devAssert)(
|
|
91
|
+
false,
|
|
92
|
+
`@${config.name} args must be an object with argument names as keys.`,
|
|
93
|
+
);
|
|
94
|
+
this.args = (0, _definition.defineArguments)(args);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
get [Symbol.toStringTag]() {
|
|
98
|
+
return 'GraphQLDirective';
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
toConfig() {
|
|
102
|
+
return {
|
|
103
|
+
name: this.name,
|
|
104
|
+
description: this.description,
|
|
105
|
+
locations: this.locations,
|
|
106
|
+
args: (0, _definition.argsToArgsConfig)(this.args),
|
|
107
|
+
isRepeatable: this.isRepeatable,
|
|
108
|
+
extensions: this.extensions,
|
|
109
|
+
astNode: this.astNode,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
toString() {
|
|
114
|
+
return '@' + this.name;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
toJSON() {
|
|
118
|
+
return this.toString();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
exports.GraphQLDirective = GraphQLDirective;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Used to conditionally include fields or fragments.
|
|
126
|
+
*/
|
|
127
|
+
const GraphQLIncludeDirective = new GraphQLDirective({
|
|
128
|
+
name: 'include',
|
|
129
|
+
description:
|
|
130
|
+
'Directs the executor to include this field or fragment only when the `if` argument is true.',
|
|
131
|
+
locations: [
|
|
132
|
+
_directiveLocation.DirectiveLocation.FIELD,
|
|
133
|
+
_directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,
|
|
134
|
+
_directiveLocation.DirectiveLocation.INLINE_FRAGMENT,
|
|
135
|
+
],
|
|
136
|
+
args: {
|
|
137
|
+
if: {
|
|
138
|
+
type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
|
|
139
|
+
description: 'Included when true.',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* Used to conditionally skip (exclude) fields or fragments.
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
exports.GraphQLIncludeDirective = GraphQLIncludeDirective;
|
|
148
|
+
const GraphQLSkipDirective = new GraphQLDirective({
|
|
149
|
+
name: 'skip',
|
|
150
|
+
description:
|
|
151
|
+
'Directs the executor to skip this field or fragment when the `if` argument is true.',
|
|
152
|
+
locations: [
|
|
153
|
+
_directiveLocation.DirectiveLocation.FIELD,
|
|
154
|
+
_directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,
|
|
155
|
+
_directiveLocation.DirectiveLocation.INLINE_FRAGMENT,
|
|
156
|
+
],
|
|
157
|
+
args: {
|
|
158
|
+
if: {
|
|
159
|
+
type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
|
|
160
|
+
description: 'Skipped when true.',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
/**
|
|
165
|
+
* Constant string used for default reason for a deprecation.
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
exports.GraphQLSkipDirective = GraphQLSkipDirective;
|
|
169
|
+
const DEFAULT_DEPRECATION_REASON = 'No longer supported';
|
|
170
|
+
/**
|
|
171
|
+
* Used to declare element of a GraphQL schema as deprecated.
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
exports.DEFAULT_DEPRECATION_REASON = DEFAULT_DEPRECATION_REASON;
|
|
175
|
+
const GraphQLDeprecatedDirective = new GraphQLDirective({
|
|
176
|
+
name: 'deprecated',
|
|
177
|
+
description: 'Marks an element of a GraphQL schema as no longer supported.',
|
|
178
|
+
locations: [
|
|
179
|
+
_directiveLocation.DirectiveLocation.FIELD_DEFINITION,
|
|
180
|
+
_directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION,
|
|
181
|
+
_directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION,
|
|
182
|
+
_directiveLocation.DirectiveLocation.ENUM_VALUE,
|
|
183
|
+
],
|
|
184
|
+
args: {
|
|
185
|
+
reason: {
|
|
186
|
+
type: _scalars.GraphQLString,
|
|
187
|
+
description:
|
|
188
|
+
'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',
|
|
189
|
+
defaultValue: DEFAULT_DEPRECATION_REASON,
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
/**
|
|
194
|
+
* Used to provide a URL for specifying the behavior of custom scalar definitions.
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
exports.GraphQLDeprecatedDirective = GraphQLDeprecatedDirective;
|
|
198
|
+
const GraphQLSpecifiedByDirective = new GraphQLDirective({
|
|
199
|
+
name: 'specifiedBy',
|
|
200
|
+
description: 'Exposes a URL that specifies the behavior of this scalar.',
|
|
201
|
+
locations: [_directiveLocation.DirectiveLocation.SCALAR],
|
|
202
|
+
args: {
|
|
203
|
+
url: {
|
|
204
|
+
type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
|
|
205
|
+
description: 'The URL that specifies the behavior of this scalar.',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
/**
|
|
210
|
+
* The full list of specified directives.
|
|
211
|
+
*/
|
|
212
|
+
|
|
213
|
+
exports.GraphQLSpecifiedByDirective = GraphQLSpecifiedByDirective;
|
|
214
|
+
const specifiedDirectives = Object.freeze([
|
|
215
|
+
GraphQLIncludeDirective,
|
|
216
|
+
GraphQLSkipDirective,
|
|
217
|
+
GraphQLDeprecatedDirective,
|
|
218
|
+
GraphQLSpecifiedByDirective,
|
|
219
|
+
]);
|
|
220
|
+
exports.specifiedDirectives = specifiedDirectives;
|
|
221
|
+
|
|
222
|
+
function isSpecifiedDirective(directive) {
|
|
223
|
+
return specifiedDirectives.some(({ name }) => name === directive.name);
|
|
224
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { devAssert } from '../jsutils/devAssert.mjs';
|
|
2
|
+
import { inspect } from '../jsutils/inspect.mjs';
|
|
3
|
+
import { instanceOf } from '../jsutils/instanceOf.mjs';
|
|
4
|
+
import { isObjectLike } from '../jsutils/isObjectLike.mjs';
|
|
5
|
+
import { toObjMap } from '../jsutils/toObjMap.mjs';
|
|
6
|
+
import { DirectiveLocation } from '../language/directiveLocation.mjs';
|
|
7
|
+
import { assertName } from './assertName.mjs';
|
|
8
|
+
import {
|
|
9
|
+
argsToArgsConfig,
|
|
10
|
+
defineArguments,
|
|
11
|
+
GraphQLNonNull,
|
|
12
|
+
} from './definition.mjs';
|
|
13
|
+
import { GraphQLBoolean, GraphQLString } from './scalars.mjs';
|
|
14
|
+
/**
|
|
15
|
+
* Test if the given value is a GraphQL directive.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export function isDirective(directive) {
|
|
19
|
+
return instanceOf(directive, GraphQLDirective);
|
|
20
|
+
}
|
|
21
|
+
export function assertDirective(directive) {
|
|
22
|
+
if (!isDirective(directive)) {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`Expected ${inspect(directive)} to be a GraphQL directive.`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return directive;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Custom extensions
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
35
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
36
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
37
|
+
* an object which can contain all the values you need.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Directives are used by the GraphQL runtime as a way of modifying execution
|
|
42
|
+
* behavior. Type system creators will usually not create these directly.
|
|
43
|
+
*/
|
|
44
|
+
export class GraphQLDirective {
|
|
45
|
+
constructor(config) {
|
|
46
|
+
var _config$isRepeatable, _config$args;
|
|
47
|
+
|
|
48
|
+
this.name = assertName(config.name);
|
|
49
|
+
this.description = config.description;
|
|
50
|
+
this.locations = config.locations;
|
|
51
|
+
this.isRepeatable =
|
|
52
|
+
(_config$isRepeatable = config.isRepeatable) !== null &&
|
|
53
|
+
_config$isRepeatable !== void 0
|
|
54
|
+
? _config$isRepeatable
|
|
55
|
+
: false;
|
|
56
|
+
this.extensions = toObjMap(config.extensions);
|
|
57
|
+
this.astNode = config.astNode;
|
|
58
|
+
Array.isArray(config.locations) ||
|
|
59
|
+
devAssert(false, `@${config.name} locations must be an Array.`);
|
|
60
|
+
const args =
|
|
61
|
+
(_config$args = config.args) !== null && _config$args !== void 0
|
|
62
|
+
? _config$args
|
|
63
|
+
: {};
|
|
64
|
+
(isObjectLike(args) && !Array.isArray(args)) ||
|
|
65
|
+
devAssert(
|
|
66
|
+
false,
|
|
67
|
+
`@${config.name} args must be an object with argument names as keys.`,
|
|
68
|
+
);
|
|
69
|
+
this.args = defineArguments(args);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
get [Symbol.toStringTag]() {
|
|
73
|
+
return 'GraphQLDirective';
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
toConfig() {
|
|
77
|
+
return {
|
|
78
|
+
name: this.name,
|
|
79
|
+
description: this.description,
|
|
80
|
+
locations: this.locations,
|
|
81
|
+
args: argsToArgsConfig(this.args),
|
|
82
|
+
isRepeatable: this.isRepeatable,
|
|
83
|
+
extensions: this.extensions,
|
|
84
|
+
astNode: this.astNode,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
toString() {
|
|
89
|
+
return '@' + this.name;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
toJSON() {
|
|
93
|
+
return this.toString();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Used to conditionally include fields or fragments.
|
|
99
|
+
*/
|
|
100
|
+
export const GraphQLIncludeDirective = new GraphQLDirective({
|
|
101
|
+
name: 'include',
|
|
102
|
+
description:
|
|
103
|
+
'Directs the executor to include this field or fragment only when the `if` argument is true.',
|
|
104
|
+
locations: [
|
|
105
|
+
DirectiveLocation.FIELD,
|
|
106
|
+
DirectiveLocation.FRAGMENT_SPREAD,
|
|
107
|
+
DirectiveLocation.INLINE_FRAGMENT,
|
|
108
|
+
],
|
|
109
|
+
args: {
|
|
110
|
+
if: {
|
|
111
|
+
type: new GraphQLNonNull(GraphQLBoolean),
|
|
112
|
+
description: 'Included when true.',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
/**
|
|
117
|
+
* Used to conditionally skip (exclude) fields or fragments.
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
export const GraphQLSkipDirective = new GraphQLDirective({
|
|
121
|
+
name: 'skip',
|
|
122
|
+
description:
|
|
123
|
+
'Directs the executor to skip this field or fragment when the `if` argument is true.',
|
|
124
|
+
locations: [
|
|
125
|
+
DirectiveLocation.FIELD,
|
|
126
|
+
DirectiveLocation.FRAGMENT_SPREAD,
|
|
127
|
+
DirectiveLocation.INLINE_FRAGMENT,
|
|
128
|
+
],
|
|
129
|
+
args: {
|
|
130
|
+
if: {
|
|
131
|
+
type: new GraphQLNonNull(GraphQLBoolean),
|
|
132
|
+
description: 'Skipped when true.',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
/**
|
|
137
|
+
* Constant string used for default reason for a deprecation.
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
export const DEFAULT_DEPRECATION_REASON = 'No longer supported';
|
|
141
|
+
/**
|
|
142
|
+
* Used to declare element of a GraphQL schema as deprecated.
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
export const GraphQLDeprecatedDirective = new GraphQLDirective({
|
|
146
|
+
name: 'deprecated',
|
|
147
|
+
description: 'Marks an element of a GraphQL schema as no longer supported.',
|
|
148
|
+
locations: [
|
|
149
|
+
DirectiveLocation.FIELD_DEFINITION,
|
|
150
|
+
DirectiveLocation.ARGUMENT_DEFINITION,
|
|
151
|
+
DirectiveLocation.INPUT_FIELD_DEFINITION,
|
|
152
|
+
DirectiveLocation.ENUM_VALUE,
|
|
153
|
+
],
|
|
154
|
+
args: {
|
|
155
|
+
reason: {
|
|
156
|
+
type: GraphQLString,
|
|
157
|
+
description:
|
|
158
|
+
'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',
|
|
159
|
+
defaultValue: DEFAULT_DEPRECATION_REASON,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
/**
|
|
164
|
+
* Used to provide a URL for specifying the behavior of custom scalar definitions.
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
export const GraphQLSpecifiedByDirective = new GraphQLDirective({
|
|
168
|
+
name: 'specifiedBy',
|
|
169
|
+
description: 'Exposes a URL that specifies the behavior of this scalar.',
|
|
170
|
+
locations: [DirectiveLocation.SCALAR],
|
|
171
|
+
args: {
|
|
172
|
+
url: {
|
|
173
|
+
type: new GraphQLNonNull(GraphQLString),
|
|
174
|
+
description: 'The URL that specifies the behavior of this scalar.',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
/**
|
|
179
|
+
* The full list of specified directives.
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
export const specifiedDirectives = Object.freeze([
|
|
183
|
+
GraphQLIncludeDirective,
|
|
184
|
+
GraphQLSkipDirective,
|
|
185
|
+
GraphQLDeprecatedDirective,
|
|
186
|
+
GraphQLSpecifiedByDirective,
|
|
187
|
+
]);
|
|
188
|
+
export function isSpecifiedDirective(directive) {
|
|
189
|
+
return specifiedDirectives.some(({ name }) => name === directive.name);
|
|
190
|
+
}
|
package/type/index.d.ts
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
export type { Path as ResponsePath } from '../jsutils/Path';
|
|
2
|
+
export { isSchema, assertSchema, GraphQLSchema } from './schema';
|
|
3
|
+
export type { GraphQLSchemaConfig, GraphQLSchemaExtensions } from './schema';
|
|
4
|
+
export {
|
|
5
|
+
resolveObjMapThunk,
|
|
6
|
+
resolveReadonlyArrayThunk,
|
|
7
|
+
isType,
|
|
8
|
+
isScalarType,
|
|
9
|
+
isObjectType,
|
|
10
|
+
isInterfaceType,
|
|
11
|
+
isUnionType,
|
|
12
|
+
isEnumType,
|
|
13
|
+
isInputObjectType,
|
|
14
|
+
isListType,
|
|
15
|
+
isNonNullType,
|
|
16
|
+
isInputType,
|
|
17
|
+
isOutputType,
|
|
18
|
+
isLeafType,
|
|
19
|
+
isCompositeType,
|
|
20
|
+
isAbstractType,
|
|
21
|
+
isWrappingType,
|
|
22
|
+
isNullableType,
|
|
23
|
+
isNamedType,
|
|
24
|
+
isRequiredArgument,
|
|
25
|
+
isRequiredInputField,
|
|
26
|
+
assertType,
|
|
27
|
+
assertScalarType,
|
|
28
|
+
assertObjectType,
|
|
29
|
+
assertInterfaceType,
|
|
30
|
+
assertUnionType,
|
|
31
|
+
assertEnumType,
|
|
32
|
+
assertInputObjectType,
|
|
33
|
+
assertListType,
|
|
34
|
+
assertNonNullType,
|
|
35
|
+
assertInputType,
|
|
36
|
+
assertOutputType,
|
|
37
|
+
assertLeafType,
|
|
38
|
+
assertCompositeType,
|
|
39
|
+
assertAbstractType,
|
|
40
|
+
assertWrappingType,
|
|
41
|
+
assertNullableType,
|
|
42
|
+
assertNamedType,
|
|
43
|
+
getNullableType,
|
|
44
|
+
getNamedType,
|
|
45
|
+
GraphQLScalarType,
|
|
46
|
+
GraphQLObjectType,
|
|
47
|
+
GraphQLInterfaceType,
|
|
48
|
+
GraphQLUnionType,
|
|
49
|
+
GraphQLEnumType,
|
|
50
|
+
GraphQLInputObjectType,
|
|
51
|
+
GraphQLList,
|
|
52
|
+
GraphQLNonNull,
|
|
53
|
+
} from './definition';
|
|
54
|
+
export type {
|
|
55
|
+
GraphQLType,
|
|
56
|
+
GraphQLInputType,
|
|
57
|
+
GraphQLOutputType,
|
|
58
|
+
GraphQLLeafType,
|
|
59
|
+
GraphQLCompositeType,
|
|
60
|
+
GraphQLAbstractType,
|
|
61
|
+
GraphQLWrappingType,
|
|
62
|
+
GraphQLNullableType,
|
|
63
|
+
GraphQLNamedType,
|
|
64
|
+
GraphQLNamedInputType,
|
|
65
|
+
GraphQLNamedOutputType,
|
|
66
|
+
ThunkReadonlyArray,
|
|
67
|
+
ThunkObjMap,
|
|
68
|
+
GraphQLArgument,
|
|
69
|
+
GraphQLArgumentConfig,
|
|
70
|
+
GraphQLArgumentExtensions,
|
|
71
|
+
GraphQLEnumTypeConfig,
|
|
72
|
+
GraphQLEnumTypeExtensions,
|
|
73
|
+
GraphQLEnumValue,
|
|
74
|
+
GraphQLEnumValueConfig,
|
|
75
|
+
GraphQLEnumValueConfigMap,
|
|
76
|
+
GraphQLEnumValueExtensions,
|
|
77
|
+
GraphQLField,
|
|
78
|
+
GraphQLFieldConfig,
|
|
79
|
+
GraphQLFieldConfigArgumentMap,
|
|
80
|
+
GraphQLFieldConfigMap,
|
|
81
|
+
GraphQLFieldExtensions,
|
|
82
|
+
GraphQLFieldMap,
|
|
83
|
+
GraphQLFieldResolver,
|
|
84
|
+
GraphQLInputField,
|
|
85
|
+
GraphQLInputFieldConfig,
|
|
86
|
+
GraphQLInputFieldConfigMap,
|
|
87
|
+
GraphQLInputFieldExtensions,
|
|
88
|
+
GraphQLInputFieldMap,
|
|
89
|
+
GraphQLInputObjectTypeConfig,
|
|
90
|
+
GraphQLInputObjectTypeExtensions,
|
|
91
|
+
GraphQLInterfaceTypeConfig,
|
|
92
|
+
GraphQLInterfaceTypeExtensions,
|
|
93
|
+
GraphQLIsTypeOfFn,
|
|
94
|
+
GraphQLObjectTypeConfig,
|
|
95
|
+
GraphQLObjectTypeExtensions,
|
|
96
|
+
GraphQLResolveInfo,
|
|
97
|
+
GraphQLScalarTypeConfig,
|
|
98
|
+
GraphQLScalarTypeExtensions,
|
|
99
|
+
GraphQLTypeResolver,
|
|
100
|
+
GraphQLUnionTypeConfig,
|
|
101
|
+
GraphQLUnionTypeExtensions,
|
|
102
|
+
GraphQLScalarSerializer,
|
|
103
|
+
GraphQLScalarValueParser,
|
|
104
|
+
GraphQLScalarLiteralParser,
|
|
105
|
+
} from './definition';
|
|
106
|
+
export {
|
|
107
|
+
isDirective,
|
|
108
|
+
assertDirective,
|
|
109
|
+
GraphQLDirective,
|
|
110
|
+
isSpecifiedDirective,
|
|
111
|
+
specifiedDirectives,
|
|
112
|
+
GraphQLIncludeDirective,
|
|
113
|
+
GraphQLSkipDirective,
|
|
114
|
+
GraphQLDeprecatedDirective,
|
|
115
|
+
GraphQLSpecifiedByDirective,
|
|
116
|
+
DEFAULT_DEPRECATION_REASON,
|
|
117
|
+
} from './directives';
|
|
118
|
+
export type {
|
|
119
|
+
GraphQLDirectiveConfig,
|
|
120
|
+
GraphQLDirectiveExtensions,
|
|
121
|
+
} from './directives';
|
|
122
|
+
export {
|
|
123
|
+
isSpecifiedScalarType,
|
|
124
|
+
specifiedScalarTypes,
|
|
125
|
+
GraphQLInt,
|
|
126
|
+
GraphQLFloat,
|
|
127
|
+
GraphQLString,
|
|
128
|
+
GraphQLBoolean,
|
|
129
|
+
GraphQLID,
|
|
130
|
+
GRAPHQL_MAX_INT,
|
|
131
|
+
GRAPHQL_MIN_INT,
|
|
132
|
+
} from './scalars';
|
|
133
|
+
export {
|
|
134
|
+
isIntrospectionType,
|
|
135
|
+
introspectionTypes,
|
|
136
|
+
__Schema,
|
|
137
|
+
__Directive,
|
|
138
|
+
__DirectiveLocation,
|
|
139
|
+
__Type,
|
|
140
|
+
__Field,
|
|
141
|
+
__InputValue,
|
|
142
|
+
__EnumValue,
|
|
143
|
+
__TypeKind,
|
|
144
|
+
TypeKind,
|
|
145
|
+
SchemaMetaFieldDef,
|
|
146
|
+
TypeMetaFieldDef,
|
|
147
|
+
TypeNameMetaFieldDef,
|
|
148
|
+
} from './introspection';
|
|
149
|
+
export { validateSchema, assertValidSchema } from './validate';
|
|
150
|
+
export { assertName, assertEnumValueName } from './assertName';
|