graphql 15.1.0 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +10 -12
- package/error/GraphQLError.js +5 -5
- package/error/GraphQLError.js.flow +5 -5
- package/error/GraphQLError.mjs +1 -1
- package/error/formatError.js +1 -1
- package/error/formatError.js.flow +2 -3
- package/error/index.js +4 -4
- package/error/index.js.flow +0 -1
- package/error/locatedError.d.ts +2 -2
- package/error/locatedError.js +10 -5
- package/error/locatedError.js.flow +11 -5
- package/error/locatedError.mjs +6 -4
- package/error/syntaxError.js +1 -1
- package/error/syntaxError.js.flow +1 -2
- package/execution/execute.d.ts +24 -16
- package/execution/execute.js +123 -105
- package/execution/execute.js.flow +169 -153
- package/execution/execute.mjs +101 -82
- package/execution/index.d.ts +2 -0
- package/execution/index.js +9 -3
- package/execution/index.js.flow +12 -3
- package/execution/index.mjs +1 -1
- package/execution/values.js +11 -11
- package/execution/values.js.flow +10 -14
- package/graphql.js +5 -5
- package/graphql.js.flow +9 -9
- package/index.d.ts +19 -1
- package/index.js +27 -9
- package/index.js.flow +10 -3
- package/index.mjs +4 -3
- package/jsutils/ObjMap.js.flow +0 -1
- package/jsutils/Path.d.ts +6 -1
- package/jsutils/Path.js +3 -2
- package/jsutils/Path.js.flow +3 -2
- package/jsutils/Path.mjs +3 -2
- package/jsutils/PromiseOrValue.js.flow +0 -1
- package/jsutils/defineInspect.js +2 -2
- package/jsutils/defineInspect.js.flow +0 -1
- package/jsutils/devAssert.js.flow +0 -1
- package/jsutils/didYouMean.js.flow +0 -1
- package/jsutils/identityFunc.js.flow +0 -1
- package/jsutils/inspect.js +1 -2
- package/jsutils/inspect.js.flow +10 -8
- package/jsutils/inspect.mjs +1 -1
- package/jsutils/instanceOf.js.flow +2 -3
- package/jsutils/invariant.js.flow +0 -1
- package/jsutils/isAsyncIterable.js +19 -0
- package/jsutils/isAsyncIterable.js.flow +18 -0
- package/jsutils/isAsyncIterable.mjs +16 -0
- package/jsutils/isCollection.js +1 -1
- package/jsutils/isCollection.js.flow +0 -1
- package/jsutils/isObjectLike.js.flow +0 -1
- package/jsutils/isPromise.js.flow +0 -1
- package/jsutils/keyMap.js.flow +1 -2
- package/jsutils/keyValMap.js.flow +1 -2
- package/jsutils/mapValue.js +1 -1
- package/jsutils/mapValue.js.flow +1 -2
- package/jsutils/memoize3.js +2 -5
- package/jsutils/memoize3.js.flow +2 -5
- package/jsutils/memoize3.mjs +2 -5
- package/jsutils/nodejsCustomInspectSymbol.js.flow +0 -1
- package/jsutils/printPathArray.js.flow +0 -1
- package/jsutils/promiseForObject.js.flow +1 -2
- package/jsutils/promiseReduce.js +1 -1
- package/jsutils/promiseReduce.js.flow +1 -1
- package/jsutils/promiseReduce.mjs +1 -1
- package/jsutils/suggestionList.js.flow +1 -2
- package/jsutils/toObjMap.js +1 -1
- package/jsutils/toObjMap.js.flow +5 -6
- package/language/ast.js +1 -1
- package/language/ast.js.flow +2 -3
- package/language/blockString.d.ts +1 -1
- package/language/blockString.js +53 -32
- package/language/blockString.js.flow +49 -34
- package/language/blockString.mjs +54 -33
- package/language/directiveLocation.js.flow +0 -1
- package/language/experimentalOnlineParser/grammar.d.ts +1006 -0
- package/language/experimentalOnlineParser/grammar.js +987 -0
- package/language/experimentalOnlineParser/grammar.js.flow +1000 -0
- package/language/experimentalOnlineParser/grammar.mjs +980 -0
- package/language/experimentalOnlineParser/index.d.ts +6 -0
- package/language/experimentalOnlineParser/index.js +31 -0
- package/language/experimentalOnlineParser/index.js.flow +7 -0
- package/language/experimentalOnlineParser/index.mjs +1 -0
- package/language/experimentalOnlineParser/onlineParser.d.ts +125 -0
- package/language/experimentalOnlineParser/onlineParser.js +604 -0
- package/language/experimentalOnlineParser/onlineParser.js.flow +723 -0
- package/language/experimentalOnlineParser/onlineParser.mjs +587 -0
- package/language/index.js +12 -12
- package/language/index.js.flow +0 -1
- package/language/kinds.js.flow +0 -1
- package/language/lexer.js +242 -183
- package/language/lexer.js.flow +191 -186
- package/language/lexer.mjs +239 -180
- package/language/location.js.flow +1 -2
- package/language/parser.js +73 -68
- package/language/parser.js.flow +112 -106
- package/language/parser.mjs +66 -62
- package/language/predicates.js +1 -1
- package/language/predicates.js.flow +1 -2
- package/language/printLocation.js +1 -1
- package/language/printLocation.js.flow +4 -4
- package/language/printer.js +20 -13
- package/language/printer.js.flow +27 -25
- package/language/printer.mjs +18 -11
- package/language/source.d.ts +12 -6
- package/language/source.js +25 -9
- package/language/source.js.flow +25 -8
- package/language/source.mjs +19 -7
- package/language/tokenKind.js.flow +0 -1
- package/language/visitor.d.ts +3 -3
- package/language/visitor.js +5 -5
- package/language/visitor.js.flow +5 -5
- package/language/visitor.mjs +3 -3
- package/package.json +1 -1
- package/polyfills/arrayFrom.js +2 -2
- package/polyfills/arrayFrom.js.flow +1 -2
- package/polyfills/arrayFrom.mjs +1 -1
- package/polyfills/find.js +1 -1
- package/polyfills/find.js.flow +1 -2
- package/polyfills/find.mjs +1 -1
- package/polyfills/isFinite.js +1 -1
- package/polyfills/isFinite.js.flow +1 -2
- package/polyfills/isFinite.mjs +1 -1
- package/polyfills/isInteger.js +1 -1
- package/polyfills/isInteger.js.flow +1 -2
- package/polyfills/isInteger.mjs +1 -1
- package/polyfills/objectEntries.js +1 -1
- package/polyfills/objectEntries.js.flow +2 -3
- package/polyfills/objectEntries.mjs +1 -1
- package/polyfills/objectValues.js +1 -1
- package/polyfills/objectValues.js.flow +2 -3
- package/polyfills/objectValues.mjs +1 -1
- package/polyfills/symbols.js +3 -5
- package/polyfills/symbols.js.flow +9 -6
- package/polyfills/symbols.mjs +3 -5
- package/subscription/index.js +1 -1
- package/subscription/index.js.flow +0 -1
- package/subscription/mapAsyncIterator.js +2 -2
- package/subscription/mapAsyncIterator.js.flow +9 -10
- package/subscription/mapAsyncIterator.mjs +1 -1
- package/subscription/subscribe.js +61 -73
- package/subscription/subscribe.js.flow +74 -88
- package/subscription/subscribe.mjs +53 -65
- package/type/definition.d.ts +181 -31
- package/type/definition.js +37 -32
- package/type/definition.js.flow +66 -51
- package/type/definition.mjs +20 -18
- package/type/directives.d.ts +17 -3
- package/type/directives.js +17 -16
- package/type/directives.js.flow +20 -21
- package/type/directives.mjs +6 -5
- package/type/index.d.ts +12 -0
- package/type/index.js +6 -6
- package/type/index.js.flow +0 -1
- package/type/introspection.js +86 -68
- package/type/introspection.js.flow +85 -54
- package/type/introspection.mjs +79 -61
- package/type/scalars.js +9 -9
- package/type/scalars.js.flow +3 -3
- package/type/scalars.mjs +1 -1
- package/type/schema.d.ts +17 -4
- package/type/schema.js +13 -13
- package/type/schema.js.flow +18 -16
- package/type/schema.mjs +1 -1
- package/type/validate.js +52 -19
- package/type/validate.js.flow +67 -18
- package/type/validate.mjs +44 -10
- package/utilities/TypeInfo.js +7 -7
- package/utilities/TypeInfo.js.flow +16 -18
- package/utilities/TypeInfo.mjs +1 -1
- package/utilities/assertValidName.js +2 -2
- package/utilities/assertValidName.js.flow +0 -1
- package/utilities/astFromValue.js +10 -10
- package/utilities/astFromValue.js.flow +2 -3
- package/utilities/buildASTSchema.js +17 -27
- package/utilities/buildASTSchema.js.flow +11 -28
- package/utilities/buildASTSchema.mjs +11 -21
- package/utilities/buildClientSchema.js +14 -14
- package/utilities/buildClientSchema.js.flow +41 -29
- package/utilities/buildClientSchema.mjs +5 -5
- package/utilities/coerceInputValue.js +14 -14
- package/utilities/coerceInputValue.js.flow +7 -6
- package/utilities/coerceInputValue.mjs +2 -2
- package/utilities/concatAST.js +9 -8
- package/utilities/concatAST.js.flow +9 -9
- package/utilities/concatAST.mjs +9 -6
- package/utilities/extendSchema.js +26 -19
- package/utilities/extendSchema.js.flow +58 -45
- package/utilities/extendSchema.mjs +9 -2
- package/utilities/findBreakingChanges.js +9 -9
- package/utilities/findBreakingChanges.js.flow +12 -11
- package/utilities/findDeprecatedUsages.d.ts +9 -1
- package/utilities/findDeprecatedUsages.js +11 -27
- package/utilities/findDeprecatedUsages.js.flow +15 -44
- package/utilities/findDeprecatedUsages.mjs +11 -25
- package/utilities/getIntrospectionQuery.js.flow +2 -3
- package/utilities/getOperationAST.js +1 -1
- package/utilities/getOperationAST.js.flow +1 -5
- package/utilities/getOperationAST.mjs +1 -1
- package/utilities/getOperationRootType.js +1 -1
- package/utilities/getOperationRootType.js.flow +5 -6
- package/utilities/index.d.ts +4 -1
- package/utilities/index.js +22 -22
- package/utilities/index.js.flow +1 -2
- package/utilities/index.mjs +1 -1
- package/utilities/introspectionFromSchema.js +6 -8
- package/utilities/introspectionFromSchema.js.flow +10 -10
- package/utilities/introspectionFromSchema.mjs +3 -4
- package/utilities/lexicographicSortSchema.js +10 -8
- package/utilities/lexicographicSortSchema.js.flow +19 -12
- package/utilities/lexicographicSortSchema.mjs +3 -1
- package/utilities/printSchema.js +15 -16
- package/utilities/printSchema.js.flow +34 -25
- package/utilities/printSchema.mjs +6 -7
- package/utilities/separateOperations.js +2 -2
- package/utilities/separateOperations.js.flow +2 -6
- package/utilities/separateOperations.mjs +1 -1
- package/utilities/stripIgnoredCharacters.js +6 -16
- package/utilities/stripIgnoredCharacters.js.flow +4 -13
- package/utilities/stripIgnoredCharacters.mjs +3 -10
- package/utilities/typeComparators.js +1 -1
- package/utilities/typeComparators.js.flow +2 -4
- package/utilities/typeFromAST.js +6 -6
- package/utilities/typeFromAST.js.flow +11 -14
- package/utilities/typeFromAST.mjs +2 -2
- package/utilities/typedQueryDocumentNode.d.ts +20 -0
- package/utilities/valueFromAST.js +6 -6
- package/utilities/valueFromAST.js.flow +7 -5
- package/utilities/valueFromASTUntyped.js +4 -4
- package/utilities/valueFromASTUntyped.js.flow +2 -3
- package/validation/ValidationContext.d.ts +3 -0
- package/validation/ValidationContext.js +7 -3
- package/validation/ValidationContext.js.flow +28 -22
- package/validation/ValidationContext.mjs +4 -0
- package/validation/index.d.ts +4 -0
- package/validation/index.js +52 -36
- package/validation/index.js.flow +4 -1
- package/validation/index.mjs +4 -1
- package/validation/rules/ExecutableDefinitions.js +1 -1
- package/validation/rules/ExecutableDefinitions.js.flow +0 -1
- package/validation/rules/ExecutableDefinitionsRule.js +3 -3
- package/validation/rules/ExecutableDefinitionsRule.js.flow +2 -3
- package/validation/rules/FieldsOnCorrectTypeRule.js +5 -5
- package/validation/rules/FieldsOnCorrectTypeRule.js.flow +9 -8
- package/validation/rules/FragmentsOnCompositeTypesRule.js +4 -4
- package/validation/rules/FragmentsOnCompositeTypesRule.js.flow +2 -3
- package/validation/rules/KnownArgumentNamesRule.js +5 -5
- package/validation/rules/KnownArgumentNamesRule.js.flow +5 -5
- package/validation/rules/KnownDirectivesRule.js +6 -6
- package/validation/rules/KnownDirectivesRule.js.flow +10 -11
- package/validation/rules/KnownFragmentNamesRule.js +1 -1
- package/validation/rules/KnownFragmentNamesRule.js.flow +3 -3
- package/validation/rules/KnownTypeNamesRule.js +12 -10
- package/validation/rules/KnownTypeNamesRule.js.flow +14 -11
- package/validation/rules/KnownTypeNamesRule.mjs +6 -5
- package/validation/rules/LoneAnonymousOperationRule.js +2 -2
- package/validation/rules/LoneAnonymousOperationRule.js.flow +2 -3
- package/validation/rules/LoneSchemaDefinition.js +1 -1
- package/validation/rules/LoneSchemaDefinition.js.flow +0 -1
- package/validation/rules/LoneSchemaDefinitionRule.js +1 -1
- package/validation/rules/LoneSchemaDefinitionRule.js.flow +2 -3
- package/validation/rules/NoFragmentCyclesRule.js +1 -1
- package/validation/rules/NoFragmentCyclesRule.js.flow +4 -5
- package/validation/rules/NoUndefinedVariablesRule.js +1 -1
- package/validation/rules/NoUndefinedVariablesRule.js.flow +3 -3
- package/validation/rules/NoUnusedFragmentsRule.js +1 -1
- package/validation/rules/NoUnusedFragmentsRule.js.flow +3 -3
- package/validation/rules/NoUnusedVariablesRule.js +1 -1
- package/validation/rules/NoUnusedVariablesRule.js.flow +3 -3
- package/validation/rules/OverlappingFieldsCanBeMergedRule.js +20 -20
- package/validation/rules/OverlappingFieldsCanBeMergedRule.js.flow +29 -27
- package/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +12 -12
- package/validation/rules/PossibleFragmentSpreadsRule.js +5 -5
- package/validation/rules/PossibleFragmentSpreadsRule.js.flow +7 -4
- package/validation/rules/PossibleTypeExtensions.js +1 -1
- package/validation/rules/PossibleTypeExtensions.js.flow +0 -1
- package/validation/rules/PossibleTypeExtensionsRule.js +8 -8
- package/validation/rules/PossibleTypeExtensionsRule.js.flow +8 -6
- package/validation/rules/ProvidedRequiredArgumentsRule.js +7 -7
- package/validation/rules/ProvidedRequiredArgumentsRule.js.flow +7 -6
- package/validation/rules/ScalarLeafsRule.js +3 -3
- package/validation/rules/ScalarLeafsRule.js.flow +3 -4
- package/validation/rules/SingleFieldSubscriptionsRule.js +1 -1
- package/validation/rules/SingleFieldSubscriptionsRule.js.flow +3 -4
- package/validation/rules/UniqueArgumentNamesRule.js +1 -1
- package/validation/rules/UniqueArgumentNamesRule.js.flow +2 -3
- package/validation/rules/UniqueDirectiveNames.js +1 -1
- package/validation/rules/UniqueDirectiveNames.js.flow +0 -1
- package/validation/rules/UniqueDirectiveNamesRule.js +1 -1
- package/validation/rules/UniqueDirectiveNamesRule.js.flow +2 -3
- package/validation/rules/UniqueDirectivesPerLocationRule.js +4 -4
- package/validation/rules/UniqueDirectivesPerLocationRule.js.flow +4 -5
- package/validation/rules/UniqueEnumValueNames.js +1 -1
- package/validation/rules/UniqueEnumValueNames.js.flow +0 -1
- package/validation/rules/UniqueEnumValueNamesRule.js +2 -2
- package/validation/rules/UniqueEnumValueNamesRule.js.flow +11 -4
- package/validation/rules/UniqueFieldDefinitionNames.js +1 -1
- package/validation/rules/UniqueFieldDefinitionNames.js.flow +0 -1
- package/validation/rules/UniqueFieldDefinitionNamesRule.js +3 -3
- package/validation/rules/UniqueFieldDefinitionNamesRule.js.flow +17 -6
- package/validation/rules/UniqueFieldDefinitionNamesRule.mjs +1 -1
- package/validation/rules/UniqueFragmentNamesRule.js +1 -1
- package/validation/rules/UniqueFragmentNamesRule.js.flow +3 -3
- package/validation/rules/UniqueInputFieldNamesRule.js +1 -1
- package/validation/rules/UniqueInputFieldNamesRule.js.flow +3 -3
- package/validation/rules/UniqueOperationNamesRule.js +1 -1
- package/validation/rules/UniqueOperationNamesRule.js.flow +3 -3
- package/validation/rules/UniqueOperationTypes.js +1 -1
- package/validation/rules/UniqueOperationTypes.js.flow +0 -1
- package/validation/rules/UniqueOperationTypesRule.js +1 -1
- package/validation/rules/UniqueOperationTypesRule.js.flow +10 -4
- package/validation/rules/UniqueTypeNames.js +1 -1
- package/validation/rules/UniqueTypeNames.js.flow +0 -1
- package/validation/rules/UniqueTypeNamesRule.js +1 -1
- package/validation/rules/UniqueTypeNamesRule.js.flow +3 -4
- package/validation/rules/UniqueVariableNamesRule.js +1 -1
- package/validation/rules/UniqueVariableNamesRule.js.flow +3 -4
- package/validation/rules/ValuesOfCorrectTypeRule.js +8 -8
- package/validation/rules/ValuesOfCorrectTypeRule.js.flow +3 -4
- package/validation/rules/VariablesAreInputTypesRule.js +4 -4
- package/validation/rules/VariablesAreInputTypesRule.js.flow +3 -4
- package/validation/rules/VariablesInAllowedPositionRule.js +6 -6
- package/validation/rules/VariablesInAllowedPositionRule.js.flow +6 -6
- package/validation/rules/custom/NoDeprecatedCustomRule.d.ts +14 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.js +79 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.js.flow +94 -0
- package/validation/rules/custom/NoDeprecatedCustomRule.mjs +68 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +16 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +34 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.js.flow +38 -0
- package/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +25 -0
- package/validation/specifiedRules.js +33 -33
- package/validation/specifiedRules.js.flow +0 -1
- package/validation/validate.js +7 -7
- package/validation/validate.js.flow +4 -9
- package/version.js +2 -2
- package/version.js.flow +2 -3
- package/version.mjs +2 -2
- package/polyfills/flatMap.js +0 -30
- package/polyfills/flatMap.js.flow +0 -28
- package/polyfills/flatMap.mjs +0 -23
package/type/definition.d.ts
CHANGED
|
@@ -183,6 +183,7 @@ interface _GraphQLList<T extends GraphQLType> {
|
|
|
183
183
|
new (type: T): GraphQLList<T>;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
186
187
|
export const GraphQLList: _GraphQLList<GraphQLType>;
|
|
187
188
|
|
|
188
189
|
/**
|
|
@@ -217,6 +218,7 @@ interface _GraphQLNonNull<T extends GraphQLNullableType> {
|
|
|
217
218
|
new (type: T): GraphQLNonNull<T>;
|
|
218
219
|
}
|
|
219
220
|
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
220
222
|
export const GraphQLNonNull: _GraphQLNonNull<GraphQLNullableType>;
|
|
221
223
|
|
|
222
224
|
export type GraphQLWrappingType = GraphQLList<any> | GraphQLNonNull<any>;
|
|
@@ -241,15 +243,13 @@ export function isNullableType(type: any): type is GraphQLNullableType;
|
|
|
241
243
|
|
|
242
244
|
export function assertNullableType(type: any): GraphQLNullableType;
|
|
243
245
|
|
|
244
|
-
// FIXME Disabled because of https://github.com/yaacovCR/graphql-tools-fork/issues/40#issuecomment-586671219
|
|
245
|
-
// tslint:disable:unified-signatures
|
|
246
246
|
export function getNullableType(type: undefined): undefined;
|
|
247
247
|
export function getNullableType<T extends GraphQLNullableType>(type: T): T;
|
|
248
248
|
export function getNullableType<T extends GraphQLNullableType>(
|
|
249
|
+
// FIXME Disabled because of https://github.com/yaacovCR/graphql-tools-fork/issues/40#issuecomment-586671219
|
|
249
250
|
// eslint-disable-next-line @typescript-eslint/unified-signatures
|
|
250
251
|
type: GraphQLNonNull<T>,
|
|
251
252
|
): T;
|
|
252
|
-
// tslint:enable:unified-signatures
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* These named types do not include modifiers like List or NonNull.
|
|
@@ -275,6 +275,19 @@ export function getNamedType(type: GraphQLType): GraphQLNamedType;
|
|
|
275
275
|
*/
|
|
276
276
|
export type Thunk<T> = (() => T) | T;
|
|
277
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Custom extensions
|
|
280
|
+
*
|
|
281
|
+
* @remarks
|
|
282
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
283
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
284
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
285
|
+
* an object which can contain all the values you need.
|
|
286
|
+
*/
|
|
287
|
+
export interface GraphQLScalarTypeExtensions {
|
|
288
|
+
[attributeName: string]: any;
|
|
289
|
+
}
|
|
290
|
+
|
|
278
291
|
/**
|
|
279
292
|
* Scalar Type Definition
|
|
280
293
|
*
|
|
@@ -299,7 +312,7 @@ export class GraphQLScalarType {
|
|
|
299
312
|
serialize: GraphQLScalarSerializer<any>;
|
|
300
313
|
parseValue: GraphQLScalarValueParser<any>;
|
|
301
314
|
parseLiteral: GraphQLScalarLiteralParser<any>;
|
|
302
|
-
extensions: Maybe<Readonly<
|
|
315
|
+
extensions: Maybe<Readonly<GraphQLScalarTypeExtensions>>;
|
|
303
316
|
astNode: Maybe<ScalarTypeDefinitionNode>;
|
|
304
317
|
extensionASTNodes: Maybe<ReadonlyArray<ScalarTypeExtensionNode>>;
|
|
305
318
|
|
|
@@ -310,7 +323,7 @@ export class GraphQLScalarType {
|
|
|
310
323
|
serialize: GraphQLScalarSerializer<any>;
|
|
311
324
|
parseValue: GraphQLScalarValueParser<any>;
|
|
312
325
|
parseLiteral: GraphQLScalarLiteralParser<any>;
|
|
313
|
-
extensions: Maybe<Readonly<
|
|
326
|
+
extensions: Maybe<Readonly<GraphQLScalarTypeExtensions>>;
|
|
314
327
|
extensionASTNodes: ReadonlyArray<ScalarTypeExtensionNode>;
|
|
315
328
|
};
|
|
316
329
|
|
|
@@ -340,11 +353,27 @@ export interface GraphQLScalarTypeConfig<TInternal, TExternal> {
|
|
|
340
353
|
parseValue?: GraphQLScalarValueParser<TInternal>;
|
|
341
354
|
// Parses an externally provided literal value to use as an input.
|
|
342
355
|
parseLiteral?: GraphQLScalarLiteralParser<TInternal>;
|
|
343
|
-
extensions?: Maybe<Readonly<
|
|
356
|
+
extensions?: Maybe<Readonly<GraphQLScalarTypeExtensions>>;
|
|
344
357
|
astNode?: Maybe<ScalarTypeDefinitionNode>;
|
|
345
358
|
extensionASTNodes?: Maybe<ReadonlyArray<ScalarTypeExtensionNode>>;
|
|
346
359
|
}
|
|
347
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Custom extensions
|
|
363
|
+
*
|
|
364
|
+
* @remarks
|
|
365
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
366
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
367
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
368
|
+
* an object which can contain all the values you need.
|
|
369
|
+
*
|
|
370
|
+
* We've provided these template arguments because this is an open type and
|
|
371
|
+
* you may find them useful.
|
|
372
|
+
*/
|
|
373
|
+
export interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> {
|
|
374
|
+
[attributeName: string]: any;
|
|
375
|
+
}
|
|
376
|
+
|
|
348
377
|
/**
|
|
349
378
|
* Object Type Definition
|
|
350
379
|
*
|
|
@@ -386,7 +415,7 @@ export class GraphQLObjectType<TSource = any, TContext = any> {
|
|
|
386
415
|
name: string;
|
|
387
416
|
description: Maybe<string>;
|
|
388
417
|
isTypeOf: Maybe<GraphQLIsTypeOfFn<TSource, TContext>>;
|
|
389
|
-
extensions: Maybe<Readonly<
|
|
418
|
+
extensions: Maybe<Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>>;
|
|
390
419
|
astNode: Maybe<ObjectTypeDefinitionNode>;
|
|
391
420
|
extensionASTNodes: Maybe<ReadonlyArray<ObjectTypeExtensionNode>>;
|
|
392
421
|
|
|
@@ -398,7 +427,7 @@ export class GraphQLObjectType<TSource = any, TContext = any> {
|
|
|
398
427
|
toConfig(): GraphQLObjectTypeConfig<any, any> & {
|
|
399
428
|
interfaces: Array<GraphQLInterfaceType>;
|
|
400
429
|
fields: GraphQLFieldConfigMap<any, any>;
|
|
401
|
-
extensions: Maybe<Readonly<
|
|
430
|
+
extensions: Maybe<Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>>;
|
|
402
431
|
extensionASTNodes: ReadonlyArray<ObjectTypeExtensionNode>;
|
|
403
432
|
};
|
|
404
433
|
|
|
@@ -417,7 +446,7 @@ export interface GraphQLObjectTypeConfig<TSource, TContext> {
|
|
|
417
446
|
interfaces?: Thunk<Maybe<Array<GraphQLInterfaceType>>>;
|
|
418
447
|
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>;
|
|
419
448
|
isTypeOf?: Maybe<GraphQLIsTypeOfFn<TSource, TContext>>;
|
|
420
|
-
extensions?: Maybe<Readonly<
|
|
449
|
+
extensions?: Maybe<Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>>;
|
|
421
450
|
astNode?: Maybe<ObjectTypeDefinitionNode>;
|
|
422
451
|
extensionASTNodes?: Maybe<ReadonlyArray<ObjectTypeExtensionNode>>;
|
|
423
452
|
}
|
|
@@ -459,6 +488,26 @@ export interface GraphQLResolveInfo {
|
|
|
459
488
|
readonly variableValues: { [variableName: string]: any };
|
|
460
489
|
}
|
|
461
490
|
|
|
491
|
+
/**
|
|
492
|
+
* Custom extensions
|
|
493
|
+
*
|
|
494
|
+
* @remarks
|
|
495
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
496
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
497
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
498
|
+
* an object which can contain all the values you need.
|
|
499
|
+
*
|
|
500
|
+
* We've provided these template arguments because this is an open type and
|
|
501
|
+
* you may find them useful.
|
|
502
|
+
*/
|
|
503
|
+
export interface GraphQLFieldExtensions<
|
|
504
|
+
_TSource,
|
|
505
|
+
_TContext,
|
|
506
|
+
_TArgs = { [argName: string]: any }
|
|
507
|
+
> {
|
|
508
|
+
[attributeName: string]: any;
|
|
509
|
+
}
|
|
510
|
+
|
|
462
511
|
export interface GraphQLFieldConfig<
|
|
463
512
|
TSource,
|
|
464
513
|
TContext,
|
|
@@ -470,7 +519,9 @@ export interface GraphQLFieldConfig<
|
|
|
470
519
|
resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
|
471
520
|
subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
|
472
521
|
deprecationReason?: Maybe<string>;
|
|
473
|
-
extensions?: Maybe<
|
|
522
|
+
extensions?: Maybe<
|
|
523
|
+
Readonly<GraphQLFieldExtensions<TSource, TContext, TArgs>>
|
|
524
|
+
>;
|
|
474
525
|
astNode?: Maybe<FieldDefinitionNode>;
|
|
475
526
|
}
|
|
476
527
|
|
|
@@ -478,11 +529,25 @@ export interface GraphQLFieldConfigArgumentMap {
|
|
|
478
529
|
[key: string]: GraphQLArgumentConfig;
|
|
479
530
|
}
|
|
480
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Custom extensions
|
|
534
|
+
*
|
|
535
|
+
* @remarks
|
|
536
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
537
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
538
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
539
|
+
* an object which can contain all the values you need.
|
|
540
|
+
*/
|
|
541
|
+
export interface GraphQLArgumentExtensions {
|
|
542
|
+
[attributeName: string]: any;
|
|
543
|
+
}
|
|
544
|
+
|
|
481
545
|
export interface GraphQLArgumentConfig {
|
|
482
546
|
description?: Maybe<string>;
|
|
483
547
|
type: GraphQLInputType;
|
|
484
548
|
defaultValue?: any;
|
|
485
|
-
|
|
549
|
+
deprecationReason?: Maybe<string>;
|
|
550
|
+
extensions?: Maybe<Readonly<GraphQLArgumentExtensions>>;
|
|
486
551
|
astNode?: Maybe<InputValueDefinitionNode>;
|
|
487
552
|
}
|
|
488
553
|
|
|
@@ -501,10 +566,12 @@ export interface GraphQLField<
|
|
|
501
566
|
args: Array<GraphQLArgument>;
|
|
502
567
|
resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
|
503
568
|
subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
|
504
|
-
isDeprecated: boolean;
|
|
505
569
|
deprecationReason: Maybe<string>;
|
|
506
|
-
extensions: Maybe<Readonly<
|
|
570
|
+
extensions: Maybe<Readonly<GraphQLFieldExtensions<TSource, TContext, TArgs>>>;
|
|
507
571
|
astNode?: Maybe<FieldDefinitionNode>;
|
|
572
|
+
|
|
573
|
+
// @deprecated and will be removed in v16
|
|
574
|
+
isDeprecated: boolean;
|
|
508
575
|
}
|
|
509
576
|
|
|
510
577
|
export interface GraphQLArgument {
|
|
@@ -512,7 +579,8 @@ export interface GraphQLArgument {
|
|
|
512
579
|
description: Maybe<string>;
|
|
513
580
|
type: GraphQLInputType;
|
|
514
581
|
defaultValue: any;
|
|
515
|
-
|
|
582
|
+
deprecationReason: Maybe<string>;
|
|
583
|
+
extensions: Maybe<Readonly<GraphQLArgumentExtensions>>;
|
|
516
584
|
astNode: Maybe<InputValueDefinitionNode>;
|
|
517
585
|
}
|
|
518
586
|
|
|
@@ -522,6 +590,19 @@ export interface GraphQLFieldMap<TSource, TContext> {
|
|
|
522
590
|
[key: string]: GraphQLField<TSource, TContext>;
|
|
523
591
|
}
|
|
524
592
|
|
|
593
|
+
/**
|
|
594
|
+
* Custom extensions
|
|
595
|
+
*
|
|
596
|
+
* @remarks
|
|
597
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
598
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
599
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
600
|
+
* an object which can contain all the values you need.
|
|
601
|
+
*/
|
|
602
|
+
export interface GraphQLInterfaceTypeExtensions {
|
|
603
|
+
[attributeName: string]: any;
|
|
604
|
+
}
|
|
605
|
+
|
|
525
606
|
/**
|
|
526
607
|
* Interface Type Definition
|
|
527
608
|
*
|
|
@@ -544,7 +625,7 @@ export class GraphQLInterfaceType {
|
|
|
544
625
|
name: string;
|
|
545
626
|
description: Maybe<string>;
|
|
546
627
|
resolveType: Maybe<GraphQLTypeResolver<any, any>>;
|
|
547
|
-
extensions: Maybe<Readonly<
|
|
628
|
+
extensions: Maybe<Readonly<GraphQLInterfaceTypeExtensions>>;
|
|
548
629
|
astNode?: Maybe<InterfaceTypeDefinitionNode>;
|
|
549
630
|
extensionASTNodes: Maybe<ReadonlyArray<InterfaceTypeExtensionNode>>;
|
|
550
631
|
|
|
@@ -555,7 +636,7 @@ export class GraphQLInterfaceType {
|
|
|
555
636
|
toConfig(): GraphQLInterfaceTypeConfig<any, any> & {
|
|
556
637
|
interfaces: Array<GraphQLInterfaceType>;
|
|
557
638
|
fields: GraphQLFieldConfigMap<any, any>;
|
|
558
|
-
extensions: Maybe<Readonly<
|
|
639
|
+
extensions: Maybe<Readonly<GraphQLInterfaceTypeExtensions>>;
|
|
559
640
|
extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>;
|
|
560
641
|
};
|
|
561
642
|
|
|
@@ -575,11 +656,24 @@ export interface GraphQLInterfaceTypeConfig<TSource, TContext> {
|
|
|
575
656
|
* Object type.
|
|
576
657
|
*/
|
|
577
658
|
resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext>>;
|
|
578
|
-
extensions?: Maybe<Readonly<
|
|
659
|
+
extensions?: Maybe<Readonly<GraphQLInterfaceTypeExtensions>>;
|
|
579
660
|
astNode?: Maybe<InterfaceTypeDefinitionNode>;
|
|
580
661
|
extensionASTNodes?: Maybe<ReadonlyArray<InterfaceTypeExtensionNode>>;
|
|
581
662
|
}
|
|
582
663
|
|
|
664
|
+
/**
|
|
665
|
+
* Custom extensions
|
|
666
|
+
*
|
|
667
|
+
* @remarks
|
|
668
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
669
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
670
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
671
|
+
* an object which can contain all the values you need.
|
|
672
|
+
*/
|
|
673
|
+
export interface GraphQLUnionTypeExtensions {
|
|
674
|
+
[attributeName: string]: any;
|
|
675
|
+
}
|
|
676
|
+
|
|
583
677
|
/**
|
|
584
678
|
* Union Type Definition
|
|
585
679
|
*
|
|
@@ -607,7 +701,7 @@ export class GraphQLUnionType {
|
|
|
607
701
|
name: string;
|
|
608
702
|
description: Maybe<string>;
|
|
609
703
|
resolveType: Maybe<GraphQLTypeResolver<any, any>>;
|
|
610
|
-
extensions: Maybe<Readonly<
|
|
704
|
+
extensions: Maybe<Readonly<GraphQLUnionTypeExtensions>>;
|
|
611
705
|
astNode: Maybe<UnionTypeDefinitionNode>;
|
|
612
706
|
extensionASTNodes: Maybe<ReadonlyArray<UnionTypeExtensionNode>>;
|
|
613
707
|
|
|
@@ -616,7 +710,7 @@ export class GraphQLUnionType {
|
|
|
616
710
|
|
|
617
711
|
toConfig(): GraphQLUnionTypeConfig<any, any> & {
|
|
618
712
|
types: Array<GraphQLObjectType>;
|
|
619
|
-
extensions: Maybe<Readonly<
|
|
713
|
+
extensions: Maybe<Readonly<GraphQLUnionTypeExtensions>>;
|
|
620
714
|
extensionASTNodes: ReadonlyArray<UnionTypeExtensionNode>;
|
|
621
715
|
};
|
|
622
716
|
|
|
@@ -635,11 +729,24 @@ export interface GraphQLUnionTypeConfig<TSource, TContext> {
|
|
|
635
729
|
* Object type.
|
|
636
730
|
*/
|
|
637
731
|
resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext>>;
|
|
638
|
-
extensions?: Maybe<Readonly<
|
|
732
|
+
extensions?: Maybe<Readonly<GraphQLUnionTypeExtensions>>;
|
|
639
733
|
astNode?: Maybe<UnionTypeDefinitionNode>;
|
|
640
734
|
extensionASTNodes?: Maybe<ReadonlyArray<UnionTypeExtensionNode>>;
|
|
641
735
|
}
|
|
642
736
|
|
|
737
|
+
/**
|
|
738
|
+
* Custom extensions
|
|
739
|
+
*
|
|
740
|
+
* @remarks
|
|
741
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
742
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
743
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
744
|
+
* an object which can contain all the values you need.
|
|
745
|
+
*/
|
|
746
|
+
export interface GraphQLEnumTypeExtensions {
|
|
747
|
+
[attributeName: string]: any;
|
|
748
|
+
}
|
|
749
|
+
|
|
643
750
|
/**
|
|
644
751
|
* Enum Type Definition
|
|
645
752
|
*
|
|
@@ -664,7 +771,7 @@ export interface GraphQLUnionTypeConfig<TSource, TContext> {
|
|
|
664
771
|
export class GraphQLEnumType {
|
|
665
772
|
name: string;
|
|
666
773
|
description: Maybe<string>;
|
|
667
|
-
extensions: Maybe<Readonly<
|
|
774
|
+
extensions: Maybe<Readonly<GraphQLEnumTypeExtensions>>;
|
|
668
775
|
astNode: Maybe<EnumTypeDefinitionNode>;
|
|
669
776
|
extensionASTNodes: Maybe<ReadonlyArray<EnumTypeExtensionNode>>;
|
|
670
777
|
|
|
@@ -679,7 +786,7 @@ export class GraphQLEnumType {
|
|
|
679
786
|
): Maybe<any>;
|
|
680
787
|
|
|
681
788
|
toConfig(): GraphQLEnumTypeConfig & {
|
|
682
|
-
extensions: Maybe<Readonly<
|
|
789
|
+
extensions: Maybe<Readonly<GraphQLEnumTypeExtensions>>;
|
|
683
790
|
extensionASTNodes: ReadonlyArray<EnumTypeExtensionNode>;
|
|
684
791
|
};
|
|
685
792
|
|
|
@@ -692,7 +799,7 @@ export interface GraphQLEnumTypeConfig {
|
|
|
692
799
|
name: string;
|
|
693
800
|
description?: Maybe<string>;
|
|
694
801
|
values: GraphQLEnumValueConfigMap;
|
|
695
|
-
extensions?: Maybe<Readonly<
|
|
802
|
+
extensions?: Maybe<Readonly<GraphQLEnumTypeExtensions>>;
|
|
696
803
|
astNode?: Maybe<EnumTypeDefinitionNode>;
|
|
697
804
|
extensionASTNodes?: Maybe<ReadonlyArray<EnumTypeExtensionNode>>;
|
|
698
805
|
}
|
|
@@ -701,11 +808,24 @@ export interface GraphQLEnumValueConfigMap {
|
|
|
701
808
|
[key: string]: GraphQLEnumValueConfig;
|
|
702
809
|
}
|
|
703
810
|
|
|
811
|
+
/**
|
|
812
|
+
* Custom extensions
|
|
813
|
+
*
|
|
814
|
+
* @remarks
|
|
815
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
816
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
817
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
818
|
+
* an object which can contain all the values you need.
|
|
819
|
+
*/
|
|
820
|
+
export interface GraphQLEnumValueExtensions {
|
|
821
|
+
[attributeName: string]: any;
|
|
822
|
+
}
|
|
823
|
+
|
|
704
824
|
export interface GraphQLEnumValueConfig {
|
|
705
825
|
description?: Maybe<string>;
|
|
706
826
|
value?: any;
|
|
707
827
|
deprecationReason?: Maybe<string>;
|
|
708
|
-
extensions?: Maybe<Readonly<
|
|
828
|
+
extensions?: Maybe<Readonly<GraphQLEnumValueExtensions>>;
|
|
709
829
|
astNode?: Maybe<EnumValueDefinitionNode>;
|
|
710
830
|
}
|
|
711
831
|
|
|
@@ -713,10 +833,25 @@ export interface GraphQLEnumValue {
|
|
|
713
833
|
name: string;
|
|
714
834
|
description: Maybe<string>;
|
|
715
835
|
value: any;
|
|
716
|
-
isDeprecated: boolean;
|
|
717
836
|
deprecationReason: Maybe<string>;
|
|
718
|
-
extensions: Maybe<Readonly<
|
|
837
|
+
extensions: Maybe<Readonly<GraphQLEnumValueExtensions>>;
|
|
719
838
|
astNode?: Maybe<EnumValueDefinitionNode>;
|
|
839
|
+
|
|
840
|
+
// @deprecated and will be removed in v16
|
|
841
|
+
isDeprecated: boolean;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Custom extensions
|
|
846
|
+
*
|
|
847
|
+
* @remarks
|
|
848
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
849
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
850
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
851
|
+
* an object which can contain all the values you need.
|
|
852
|
+
*/
|
|
853
|
+
export interface GraphQLInputObjectTypeExtensions {
|
|
854
|
+
[attributeName: string]: any;
|
|
720
855
|
}
|
|
721
856
|
|
|
722
857
|
/**
|
|
@@ -742,7 +877,7 @@ export interface GraphQLEnumValue {
|
|
|
742
877
|
export class GraphQLInputObjectType {
|
|
743
878
|
name: string;
|
|
744
879
|
description: Maybe<string>;
|
|
745
|
-
extensions: Maybe<Readonly<
|
|
880
|
+
extensions: Maybe<Readonly<GraphQLInputObjectTypeExtensions>>;
|
|
746
881
|
astNode: Maybe<InputObjectTypeDefinitionNode>;
|
|
747
882
|
extensionASTNodes: Maybe<ReadonlyArray<InputObjectTypeExtensionNode>>;
|
|
748
883
|
|
|
@@ -751,7 +886,7 @@ export class GraphQLInputObjectType {
|
|
|
751
886
|
|
|
752
887
|
toConfig(): GraphQLInputObjectTypeConfig & {
|
|
753
888
|
fields: GraphQLInputFieldConfigMap;
|
|
754
|
-
extensions: Maybe<Readonly<
|
|
889
|
+
extensions: Maybe<Readonly<GraphQLInputObjectTypeExtensions>>;
|
|
755
890
|
extensionASTNodes: ReadonlyArray<InputObjectTypeExtensionNode>;
|
|
756
891
|
};
|
|
757
892
|
|
|
@@ -764,16 +899,30 @@ export interface GraphQLInputObjectTypeConfig {
|
|
|
764
899
|
name: string;
|
|
765
900
|
description?: Maybe<string>;
|
|
766
901
|
fields: Thunk<GraphQLInputFieldConfigMap>;
|
|
767
|
-
extensions?: Maybe<Readonly<
|
|
902
|
+
extensions?: Maybe<Readonly<GraphQLInputObjectTypeExtensions>>;
|
|
768
903
|
astNode?: Maybe<InputObjectTypeDefinitionNode>;
|
|
769
904
|
extensionASTNodes?: Maybe<ReadonlyArray<InputObjectTypeExtensionNode>>;
|
|
770
905
|
}
|
|
771
906
|
|
|
907
|
+
/**
|
|
908
|
+
* Custom extensions
|
|
909
|
+
*
|
|
910
|
+
* @remarks
|
|
911
|
+
* Use a unique identifier name for your extension, for example the name of
|
|
912
|
+
* your library or project. Do not use a shortened identifier as this increases
|
|
913
|
+
* the risk of conflicts. We recommend you add at most one extension field,
|
|
914
|
+
* an object which can contain all the values you need.
|
|
915
|
+
*/
|
|
916
|
+
export interface GraphQLInputFieldExtensions {
|
|
917
|
+
[attributeName: string]: any;
|
|
918
|
+
}
|
|
919
|
+
|
|
772
920
|
export interface GraphQLInputFieldConfig {
|
|
773
921
|
description?: Maybe<string>;
|
|
774
922
|
type: GraphQLInputType;
|
|
775
923
|
defaultValue?: any;
|
|
776
|
-
|
|
924
|
+
deprecationReason?: Maybe<string>;
|
|
925
|
+
extensions?: Maybe<Readonly<GraphQLInputFieldExtensions>>;
|
|
777
926
|
astNode?: Maybe<InputValueDefinitionNode>;
|
|
778
927
|
}
|
|
779
928
|
|
|
@@ -786,7 +935,8 @@ export interface GraphQLInputField {
|
|
|
786
935
|
description?: Maybe<string>;
|
|
787
936
|
type: GraphQLInputType;
|
|
788
937
|
defaultValue?: any;
|
|
789
|
-
|
|
938
|
+
deprecationReason: Maybe<string>;
|
|
939
|
+
extensions: Maybe<Readonly<GraphQLInputFieldExtensions>>;
|
|
790
940
|
astNode?: Maybe<InputValueDefinitionNode>;
|
|
791
941
|
}
|
|
792
942
|
|
package/type/definition.js
CHANGED
|
@@ -46,41 +46,41 @@ exports.isRequiredArgument = isRequiredArgument;
|
|
|
46
46
|
exports.isRequiredInputField = isRequiredInputField;
|
|
47
47
|
exports.GraphQLInputObjectType = exports.GraphQLEnumType = exports.GraphQLUnionType = exports.GraphQLInterfaceType = exports.GraphQLObjectType = exports.GraphQLScalarType = void 0;
|
|
48
48
|
|
|
49
|
-
var _objectEntries = _interopRequireDefault(require("../polyfills/objectEntries"));
|
|
49
|
+
var _objectEntries = _interopRequireDefault(require("../polyfills/objectEntries.js"));
|
|
50
50
|
|
|
51
|
-
var _symbols = require("../polyfills/symbols");
|
|
51
|
+
var _symbols = require("../polyfills/symbols.js");
|
|
52
52
|
|
|
53
|
-
var _inspect = _interopRequireDefault(require("../jsutils/inspect"));
|
|
53
|
+
var _inspect = _interopRequireDefault(require("../jsutils/inspect.js"));
|
|
54
54
|
|
|
55
|
-
var _keyMap = _interopRequireDefault(require("../jsutils/keyMap"));
|
|
55
|
+
var _keyMap = _interopRequireDefault(require("../jsutils/keyMap.js"));
|
|
56
56
|
|
|
57
|
-
var _mapValue = _interopRequireDefault(require("../jsutils/mapValue"));
|
|
57
|
+
var _mapValue = _interopRequireDefault(require("../jsutils/mapValue.js"));
|
|
58
58
|
|
|
59
|
-
var _toObjMap = _interopRequireDefault(require("../jsutils/toObjMap"));
|
|
59
|
+
var _toObjMap = _interopRequireDefault(require("../jsutils/toObjMap.js"));
|
|
60
60
|
|
|
61
|
-
var _devAssert = _interopRequireDefault(require("../jsutils/devAssert"));
|
|
61
|
+
var _devAssert = _interopRequireDefault(require("../jsutils/devAssert.js"));
|
|
62
62
|
|
|
63
|
-
var _keyValMap = _interopRequireDefault(require("../jsutils/keyValMap"));
|
|
63
|
+
var _keyValMap = _interopRequireDefault(require("../jsutils/keyValMap.js"));
|
|
64
64
|
|
|
65
|
-
var _instanceOf = _interopRequireDefault(require("../jsutils/instanceOf"));
|
|
65
|
+
var _instanceOf = _interopRequireDefault(require("../jsutils/instanceOf.js"));
|
|
66
66
|
|
|
67
|
-
var _didYouMean = _interopRequireDefault(require("../jsutils/didYouMean"));
|
|
67
|
+
var _didYouMean = _interopRequireDefault(require("../jsutils/didYouMean.js"));
|
|
68
68
|
|
|
69
|
-
var _isObjectLike = _interopRequireDefault(require("../jsutils/isObjectLike"));
|
|
69
|
+
var _isObjectLike = _interopRequireDefault(require("../jsutils/isObjectLike.js"));
|
|
70
70
|
|
|
71
|
-
var _identityFunc = _interopRequireDefault(require("../jsutils/identityFunc"));
|
|
71
|
+
var _identityFunc = _interopRequireDefault(require("../jsutils/identityFunc.js"));
|
|
72
72
|
|
|
73
|
-
var _defineInspect = _interopRequireDefault(require("../jsutils/defineInspect"));
|
|
73
|
+
var _defineInspect = _interopRequireDefault(require("../jsutils/defineInspect.js"));
|
|
74
74
|
|
|
75
|
-
var _suggestionList = _interopRequireDefault(require("../jsutils/suggestionList"));
|
|
75
|
+
var _suggestionList = _interopRequireDefault(require("../jsutils/suggestionList.js"));
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _GraphQLError = require("../error/GraphQLError.js");
|
|
78
78
|
|
|
79
|
-
var
|
|
79
|
+
var _kinds = require("../language/kinds.js");
|
|
80
80
|
|
|
81
|
-
var
|
|
81
|
+
var _printer = require("../language/printer.js");
|
|
82
82
|
|
|
83
|
-
var _valueFromASTUntyped = require("../utilities/valueFromASTUntyped");
|
|
83
|
+
var _valueFromASTUntyped = require("../utilities/valueFromASTUntyped.js");
|
|
84
84
|
|
|
85
85
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
86
86
|
|
|
@@ -299,8 +299,8 @@ function assertAbstractType(type) {
|
|
|
299
299
|
* const PersonType = new GraphQLObjectType({
|
|
300
300
|
* name: 'Person',
|
|
301
301
|
* fields: () => ({
|
|
302
|
-
* parents: { type: GraphQLList(PersonType) },
|
|
303
|
-
* children: { type: GraphQLList(PersonType) },
|
|
302
|
+
* parents: { type: new GraphQLList(PersonType) },
|
|
303
|
+
* children: { type: new GraphQLList(PersonType) },
|
|
304
304
|
* })
|
|
305
305
|
* })
|
|
306
306
|
*
|
|
@@ -318,6 +318,7 @@ declare class GraphQLList<+T: GraphQLType> {
|
|
|
318
318
|
|
|
319
319
|
|
|
320
320
|
function GraphQLList(ofType) {
|
|
321
|
+
// istanbul ignore else (to be removed in v16.0.0)
|
|
321
322
|
if (this instanceof GraphQLList) {
|
|
322
323
|
this.ofType = assertType(ofType);
|
|
323
324
|
} else {
|
|
@@ -355,7 +356,7 @@ Object.defineProperty(GraphQLList.prototype, _symbols.SYMBOL_TO_STRING_TAG, {
|
|
|
355
356
|
* const RowType = new GraphQLObjectType({
|
|
356
357
|
* name: 'Row',
|
|
357
358
|
* fields: () => ({
|
|
358
|
-
* id: { type: GraphQLNonNull(GraphQLString) },
|
|
359
|
+
* id: { type: new GraphQLNonNull(GraphQLString) },
|
|
359
360
|
* })
|
|
360
361
|
* })
|
|
361
362
|
*
|
|
@@ -373,6 +374,7 @@ declare class GraphQLNonNull<+T: GraphQLNullableType> {
|
|
|
373
374
|
*/
|
|
374
375
|
|
|
375
376
|
function GraphQLNonNull(ofType) {
|
|
377
|
+
// istanbul ignore else (to be removed in v16.0.0)
|
|
376
378
|
if (this instanceof GraphQLNonNull) {
|
|
377
379
|
this.ofType = assertNullableType(ofType);
|
|
378
380
|
} else {
|
|
@@ -474,7 +476,7 @@ function getNamedType(type) {
|
|
|
474
476
|
|
|
475
477
|
|
|
476
478
|
function resolveThunk(thunk) {
|
|
477
|
-
// $FlowFixMe
|
|
479
|
+
// $FlowFixMe[incompatible-use]
|
|
478
480
|
return typeof thunk === 'function' ? thunk() : thunk;
|
|
479
481
|
}
|
|
480
482
|
|
|
@@ -517,8 +519,8 @@ var GraphQLScalarType = /*#__PURE__*/function () {
|
|
|
517
519
|
this.specifiedByUrl = config.specifiedByUrl;
|
|
518
520
|
this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
519
521
|
this.parseValue = parseValue;
|
|
520
|
-
this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function (node) {
|
|
521
|
-
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node));
|
|
522
|
+
this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function (node, variables) {
|
|
523
|
+
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables));
|
|
522
524
|
};
|
|
523
525
|
this.extensions = config.extensions && (0, _toObjMap.default)(config.extensions);
|
|
524
526
|
this.astNode = config.astNode;
|
|
@@ -556,7 +558,7 @@ var GraphQLScalarType = /*#__PURE__*/function () {
|
|
|
556
558
|
|
|
557
559
|
_proto.toJSON = function toJSON() {
|
|
558
560
|
return this.toString();
|
|
559
|
-
} // $FlowFixMe Flow doesn't support computed properties yet
|
|
561
|
+
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
560
562
|
;
|
|
561
563
|
|
|
562
564
|
_createClass(GraphQLScalarType, [{
|
|
@@ -661,7 +663,7 @@ var GraphQLObjectType = /*#__PURE__*/function () {
|
|
|
661
663
|
|
|
662
664
|
_proto2.toJSON = function toJSON() {
|
|
663
665
|
return this.toString();
|
|
664
|
-
} // $FlowFixMe Flow doesn't support computed properties yet
|
|
666
|
+
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
665
667
|
;
|
|
666
668
|
|
|
667
669
|
_createClass(GraphQLObjectType, [{
|
|
@@ -705,6 +707,7 @@ function defineFieldMap(config) {
|
|
|
705
707
|
description: argConfig.description,
|
|
706
708
|
type: argConfig.type,
|
|
707
709
|
defaultValue: argConfig.defaultValue,
|
|
710
|
+
deprecationReason: argConfig.deprecationReason,
|
|
708
711
|
extensions: argConfig.extensions && (0, _toObjMap.default)(argConfig.extensions),
|
|
709
712
|
astNode: argConfig.astNode
|
|
710
713
|
};
|
|
@@ -755,6 +758,7 @@ function argsToArgsConfig(args) {
|
|
|
755
758
|
description: arg.description,
|
|
756
759
|
type: arg.type,
|
|
757
760
|
defaultValue: arg.defaultValue,
|
|
761
|
+
deprecationReason: arg.deprecationReason,
|
|
758
762
|
extensions: arg.extensions,
|
|
759
763
|
astNode: arg.astNode
|
|
760
764
|
};
|
|
@@ -836,7 +840,7 @@ var GraphQLInterfaceType = /*#__PURE__*/function () {
|
|
|
836
840
|
|
|
837
841
|
_proto3.toJSON = function toJSON() {
|
|
838
842
|
return this.toString();
|
|
839
|
-
} // $FlowFixMe Flow doesn't support computed properties yet
|
|
843
|
+
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
840
844
|
;
|
|
841
845
|
|
|
842
846
|
_createClass(GraphQLInterfaceType, [{
|
|
@@ -919,7 +923,7 @@ var GraphQLUnionType = /*#__PURE__*/function () {
|
|
|
919
923
|
|
|
920
924
|
_proto4.toJSON = function toJSON() {
|
|
921
925
|
return this.toString();
|
|
922
|
-
} // $FlowFixMe Flow doesn't support computed properties yet
|
|
926
|
+
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
923
927
|
;
|
|
924
928
|
|
|
925
929
|
_createClass(GraphQLUnionType, [{
|
|
@@ -1069,7 +1073,7 @@ var GraphQLEnumType
|
|
|
1069
1073
|
|
|
1070
1074
|
_proto5.toJSON = function toJSON() {
|
|
1071
1075
|
return this.toString();
|
|
1072
|
-
} // $FlowFixMe Flow doesn't support computed properties yet
|
|
1076
|
+
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
1073
1077
|
;
|
|
1074
1078
|
|
|
1075
1079
|
_createClass(GraphQLEnumType, [{
|
|
@@ -1126,8 +1130,8 @@ function defineEnumValues(typeName, valueMap) {
|
|
|
1126
1130
|
* const GeoPoint = new GraphQLInputObjectType({
|
|
1127
1131
|
* name: 'GeoPoint',
|
|
1128
1132
|
* fields: {
|
|
1129
|
-
* lat: { type: GraphQLNonNull(GraphQLFloat) },
|
|
1130
|
-
* lon: { type: GraphQLNonNull(GraphQLFloat) },
|
|
1133
|
+
* lat: { type: new GraphQLNonNull(GraphQLFloat) },
|
|
1134
|
+
* lon: { type: new GraphQLNonNull(GraphQLFloat) },
|
|
1131
1135
|
* alt: { type: GraphQLFloat, defaultValue: 0 },
|
|
1132
1136
|
* }
|
|
1133
1137
|
* });
|
|
@@ -1182,7 +1186,7 @@ var GraphQLInputObjectType = /*#__PURE__*/function () {
|
|
|
1182
1186
|
|
|
1183
1187
|
_proto6.toJSON = function toJSON() {
|
|
1184
1188
|
return this.toString();
|
|
1185
|
-
} // $FlowFixMe Flow doesn't support computed properties yet
|
|
1189
|
+
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
1186
1190
|
;
|
|
1187
1191
|
|
|
1188
1192
|
_createClass(GraphQLInputObjectType, [{
|
|
@@ -1209,6 +1213,7 @@ function defineInputFieldMap(config) {
|
|
|
1209
1213
|
description: fieldConfig.description,
|
|
1210
1214
|
type: fieldConfig.type,
|
|
1211
1215
|
defaultValue: fieldConfig.defaultValue,
|
|
1216
|
+
deprecationReason: fieldConfig.deprecationReason,
|
|
1212
1217
|
extensions: fieldConfig.extensions && (0, _toObjMap.default)(fieldConfig.extensions),
|
|
1213
1218
|
astNode: fieldConfig.astNode
|
|
1214
1219
|
};
|