graphql 14.5.0 → 14.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/error/GraphQLError.d.ts +21 -12
- package/error/formatError.d.ts +1 -1
- package/error/formatError.js +3 -0
- package/error/formatError.js.flow +22 -0
- package/error/formatError.mjs +3 -0
- package/error/index.d.ts +1 -2
- package/error/locatedError.d.ts +1 -1
- package/execution/execute.d.ts +33 -30
- package/execution/index.d.ts +3 -1
- package/execution/values.d.ts +12 -11
- package/graphql.d.ts +5 -2
- package/index.d.ts +107 -54
- package/jsutils/Path.d.ts +14 -0
- package/language/ast.d.ts +1 -1
- package/language/blockString.d.ts +14 -0
- package/language/index.d.ts +6 -3
- package/language/lexer.d.ts +3 -40
- package/language/parser.d.ts +1 -27
- package/language/printLocation.d.ts +16 -0
- package/language/tokenKind.d.ts +35 -0
- package/language/visitor.d.ts +107 -15
- package/package.json +2 -1
- package/polyfills/flatMap.js +5 -3
- package/polyfills/flatMap.js.flow +5 -2
- package/polyfills/flatMap.mjs +5 -2
- package/polyfills/isFinite.js +2 -2
- package/polyfills/isFinite.js.flow +5 -4
- package/polyfills/isFinite.mjs +2 -2
- package/subscription/asyncIteratorReject.d.ts +6 -0
- package/subscription/index.d.ts +5 -1
- package/subscription/mapAsyncIterator.d.ts +11 -0
- package/subscription/subscribe.d.ts +16 -12
- package/type/definition.d.ts +54 -23
- package/type/definition.js +10 -6
- package/type/definition.js.flow +2 -3
- package/type/definition.mjs +10 -6
- package/type/directives.d.ts +10 -2
- package/type/directives.js +1 -1
- package/type/directives.js.flow +1 -1
- package/type/directives.mjs +1 -1
- package/type/index.d.ts +6 -1
- package/type/introspection.d.ts +3 -8
- package/type/scalars.d.ts +1 -1
- package/type/schema.d.ts +9 -3
- package/type/validate.d.ts +1 -1
- package/utilities/TypeInfo.d.ts +4 -4
- package/utilities/buildASTSchema.d.ts +13 -11
- package/utilities/coerceInputValue.d.ts +17 -0
- package/utilities/coerceValue.d.ts +2 -6
- package/utilities/extendSchema.d.ts +1 -2
- package/utilities/findBreakingChanges.d.ts +9 -135
- package/utilities/findDeprecatedUsages.d.ts +2 -2
- package/utilities/getOperationRootType.d.ts +1 -1
- package/utilities/index.d.ts +7 -0
- package/utilities/separateOperations.d.ts +1 -1
- package/utilities/stripIgnoredCharacters.d.ts +55 -0
- package/utilities/typeComparators.d.ts +1 -5
- package/utilities/typeFromAST.d.ts +2 -9
- package/utilities/valueFromAST.d.ts +1 -6
- package/validation/ValidationContext.d.ts +23 -14
- package/validation/index.d.ts +1 -1
- package/validation/rules/ExecutableDefinitions.d.ts +1 -1
- package/validation/rules/FieldsOnCorrectType.d.ts +8 -1
- package/validation/rules/FragmentsOnCompositeTypes.d.ts +1 -1
- package/validation/rules/KnownArgumentNames.d.ts +2 -2
- package/validation/rules/KnownDirectives.d.ts +1 -1
- package/validation/rules/KnownFragmentNames.d.ts +1 -1
- package/validation/rules/KnownTypeNames.d.ts +1 -1
- package/validation/rules/LoneAnonymousOperation.d.ts +1 -1
- package/validation/rules/LoneSchemaDefinition.d.ts +1 -1
- package/validation/rules/NoFragmentCycles.d.ts +2 -2
- package/validation/rules/NoUndefinedVariables.d.ts +1 -1
- package/validation/rules/NoUnusedFragments.d.ts +1 -1
- package/validation/rules/NoUnusedVariables.d.ts +1 -1
- package/validation/rules/OverlappingFieldsCanBeMerged.d.ts +1 -1
- package/validation/rules/PossibleFragmentSpreads.d.ts +1 -1
- package/validation/rules/PossibleTypeExtensions.d.ts +21 -0
- package/validation/rules/ProvidedRequiredArguments.d.ts +1 -1
- package/validation/rules/ScalarLeafs.d.ts +1 -1
- package/validation/rules/SingleFieldSubscriptions.d.ts +1 -1
- package/validation/rules/UniqueArgumentNames.d.ts +1 -1
- package/validation/rules/UniqueDirectiveNames.d.ts +13 -0
- package/validation/rules/UniqueDirectivesPerLocation.d.ts +1 -1
- package/validation/rules/UniqueEnumValueNames.d.ts +19 -0
- package/validation/rules/UniqueFieldDefinitionNames.d.ts +21 -0
- package/validation/rules/UniqueFragmentNames.d.ts +1 -1
- package/validation/rules/UniqueInputFieldNames.d.ts +1 -1
- package/validation/rules/UniqueOperationNames.d.ts +1 -1
- package/validation/rules/UniqueOperationTypes.d.ts +13 -0
- package/validation/rules/UniqueTypeNames.d.ts +13 -0
- package/validation/rules/UniqueVariableNames.d.ts +1 -1
- package/validation/rules/ValuesOfCorrectType.d.ts +8 -2
- package/validation/rules/VariablesAreInputTypes.d.ts +1 -1
- package/validation/rules/VariablesInAllowedPosition.d.ts +1 -1
- package/validation/specifiedRules.d.ts +8 -2
- package/validation/validate.d.ts +4 -2
- package/version.d.ts +14 -0
- package/version.js +2 -2
- package/version.js.flow +2 -2
- package/version.mjs +2 -2
- package/error/printError.d.ts +0 -7
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { SDLValidationContext } from '../ValidationContext';
|
|
3
|
+
|
|
4
|
+
export function extendingUnknownTypeMessage(
|
|
5
|
+
typeName: string,
|
|
6
|
+
suggestedTypes: ReadonlyArray<string>,
|
|
7
|
+
): string;
|
|
8
|
+
|
|
9
|
+
export function extendingDifferentTypeKindMessage(
|
|
10
|
+
typeName: string,
|
|
11
|
+
kind: string,
|
|
12
|
+
): string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Possible type extension
|
|
16
|
+
*
|
|
17
|
+
* A type extension is only valid if the type is defined and has the same kind.
|
|
18
|
+
*/
|
|
19
|
+
export function PossibleTypeExtensions(
|
|
20
|
+
context: SDLValidationContext,
|
|
21
|
+
): ASTVisitor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ValidationContext, SDLValidationContext } from '../ValidationContext';
|
|
2
1
|
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { ValidationContext, SDLValidationContext } from '../ValidationContext';
|
|
3
3
|
|
|
4
4
|
export function missingFieldArgMessage(
|
|
5
5
|
fieldName: string,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Maybe from '../../tsutils/Maybe';
|
|
2
|
-
import { ASTValidationContext } from '../ValidationContext';
|
|
3
2
|
import { ASTVisitor } from '../../language/visitor';
|
|
3
|
+
import { ASTValidationContext } from '../ValidationContext';
|
|
4
4
|
|
|
5
5
|
export function singleFieldOnlyMessage(name: Maybe<string>): string;
|
|
6
6
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { SDLValidationContext } from '../ValidationContext';
|
|
3
|
+
|
|
4
|
+
export function duplicateDirectiveNameMessage(directiveName: string): string;
|
|
5
|
+
|
|
6
|
+
export function existedDirectiveNameMessage(directiveName: string): string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Unique directive names
|
|
10
|
+
*
|
|
11
|
+
* A GraphQL document is only valid if all defined directives have unique names.
|
|
12
|
+
*/
|
|
13
|
+
export function UniqueDirectiveNames(context: SDLValidationContext): ASTVisitor;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { SDLValidationContext } from '../ValidationContext';
|
|
3
|
+
|
|
4
|
+
export function duplicateEnumValueNameMessage(
|
|
5
|
+
typeName: string,
|
|
6
|
+
valueName: string,
|
|
7
|
+
): string;
|
|
8
|
+
|
|
9
|
+
export function existedEnumValueNameMessage(
|
|
10
|
+
typeName: string,
|
|
11
|
+
valueName: string,
|
|
12
|
+
): string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Unique enum value names
|
|
16
|
+
*
|
|
17
|
+
* A GraphQL enum type is only valid if all its values are uniquely named.
|
|
18
|
+
*/
|
|
19
|
+
export function UniqueEnumValueNames(context: SDLValidationContext): ASTVisitor;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { SDLValidationContext } from '../ValidationContext';
|
|
3
|
+
|
|
4
|
+
export function duplicateFieldDefinitionNameMessage(
|
|
5
|
+
typeName: string,
|
|
6
|
+
fieldName: string,
|
|
7
|
+
): string;
|
|
8
|
+
|
|
9
|
+
export function existedFieldDefinitionNameMessage(
|
|
10
|
+
typeName: string,
|
|
11
|
+
fieldName: string,
|
|
12
|
+
): string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Unique field definition names
|
|
16
|
+
*
|
|
17
|
+
* A GraphQL complex type is only valid if all its fields are uniquely named.
|
|
18
|
+
*/
|
|
19
|
+
export function UniqueFieldDefinitionNames(
|
|
20
|
+
context: SDLValidationContext,
|
|
21
|
+
): ASTVisitor;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { SDLValidationContext } from '../ValidationContext';
|
|
3
|
+
|
|
4
|
+
export function duplicateOperationTypeMessage(operation: string): string;
|
|
5
|
+
|
|
6
|
+
export function existedOperationTypeMessage(operation: string): string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Unique operation types
|
|
10
|
+
*
|
|
11
|
+
* A GraphQL document is only valid if it has only one type per operation.
|
|
12
|
+
*/
|
|
13
|
+
export function UniqueOperationTypes(context: SDLValidationContext): ASTVisitor;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { SDLValidationContext } from '../ValidationContext';
|
|
3
|
+
|
|
4
|
+
export function duplicateTypeNameMessage(typeName: string): string;
|
|
5
|
+
|
|
6
|
+
export function existedTypeNameMessage(typeName: string): string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Unique type names
|
|
10
|
+
*
|
|
11
|
+
* A GraphQL document is only valid if all defined types have unique names.
|
|
12
|
+
*/
|
|
13
|
+
export function UniqueTypeNames(context: SDLValidationContext): ASTVisitor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ValidationContext } from '../ValidationContext';
|
|
2
1
|
import { ASTVisitor } from '../../language/visitor';
|
|
2
|
+
import { ValidationContext } from '../ValidationContext';
|
|
3
3
|
|
|
4
4
|
export function badValueMessage(
|
|
5
5
|
typeName: string,
|
|
@@ -7,6 +7,12 @@ export function badValueMessage(
|
|
|
7
7
|
message?: string,
|
|
8
8
|
): string;
|
|
9
9
|
|
|
10
|
+
export function badEnumValueMessage(
|
|
11
|
+
typeName: string,
|
|
12
|
+
valueName: string,
|
|
13
|
+
suggestedValues: ReadonlyArray<string>,
|
|
14
|
+
): string;
|
|
15
|
+
|
|
10
16
|
export function requiredFieldMessage(
|
|
11
17
|
typeName: string,
|
|
12
18
|
fieldName: string,
|
|
@@ -16,7 +22,7 @@ export function requiredFieldMessage(
|
|
|
16
22
|
export function unknownFieldMessage(
|
|
17
23
|
typeName: string,
|
|
18
24
|
fieldName: string,
|
|
19
|
-
|
|
25
|
+
suggestedFields: ReadonlyArray<string>,
|
|
20
26
|
): string;
|
|
21
27
|
|
|
22
28
|
/**
|
|
@@ -58,7 +58,10 @@ import { KnownDirectives } from './rules/KnownDirectives';
|
|
|
58
58
|
import { UniqueDirectivesPerLocation } from './rules/UniqueDirectivesPerLocation';
|
|
59
59
|
|
|
60
60
|
// Spec Section: "Argument Names"
|
|
61
|
-
import {
|
|
61
|
+
import {
|
|
62
|
+
KnownArgumentNames,
|
|
63
|
+
KnownArgumentNamesOnDirectives, // @internal
|
|
64
|
+
} from './rules/KnownArgumentNames';
|
|
62
65
|
|
|
63
66
|
// Spec Section: "Argument Uniqueness"
|
|
64
67
|
import { UniqueArgumentNames } from './rules/UniqueArgumentNames';
|
|
@@ -67,7 +70,10 @@ import { UniqueArgumentNames } from './rules/UniqueArgumentNames';
|
|
|
67
70
|
import { ValuesOfCorrectType } from './rules/ValuesOfCorrectType';
|
|
68
71
|
|
|
69
72
|
// Spec Section: "Argument Optionality"
|
|
70
|
-
import {
|
|
73
|
+
import {
|
|
74
|
+
ProvidedRequiredArguments,
|
|
75
|
+
ProvidedRequiredArgumentsOnDirectives, // @internal
|
|
76
|
+
} from './rules/ProvidedRequiredArguments';
|
|
71
77
|
|
|
72
78
|
// Spec Section: "All Variable Usages Are Allowed"
|
|
73
79
|
import { VariablesInAllowedPosition } from './rules/VariablesInAllowedPosition';
|
package/validation/validate.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { GraphQLError } from '../error';
|
|
1
|
+
import { GraphQLError } from '../error/GraphQLError';
|
|
2
2
|
import { DocumentNode } from '../language/ast';
|
|
3
3
|
import { GraphQLSchema } from '../type/schema';
|
|
4
4
|
import { TypeInfo } from '../utilities/TypeInfo';
|
|
5
5
|
import { ValidationRule, SDLValidationRule } from './ValidationContext';
|
|
6
|
+
import Maybe from '../tsutils/Maybe';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Implements the "Validation" section of the spec.
|
|
@@ -25,12 +26,13 @@ export function validate(
|
|
|
25
26
|
documentAST: DocumentNode,
|
|
26
27
|
rules?: ReadonlyArray<ValidationRule>,
|
|
27
28
|
typeInfo?: TypeInfo,
|
|
29
|
+
options?: { maxErrors?: number },
|
|
28
30
|
): ReadonlyArray<GraphQLError>;
|
|
29
31
|
|
|
30
32
|
// @internal
|
|
31
33
|
export function validateSDL(
|
|
32
34
|
documentAST: DocumentNode,
|
|
33
|
-
schemaToExtend?: GraphQLSchema
|
|
35
|
+
schemaToExtend?: Maybe<GraphQLSchema>,
|
|
34
36
|
rules?: ReadonlyArray<SDLValidationRule>,
|
|
35
37
|
): GraphQLError[];
|
|
36
38
|
|
package/version.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A string containing the version of the GraphQL.js library
|
|
3
|
+
*/
|
|
4
|
+
export const version: string;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An object containing the components of the GraphQL.js version string
|
|
8
|
+
*/
|
|
9
|
+
export const versionInfo: {
|
|
10
|
+
major: number;
|
|
11
|
+
minor: number;
|
|
12
|
+
patch: number;
|
|
13
|
+
preReleaseTag: number | null;
|
|
14
|
+
};
|
package/version.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.versionInfo = exports.version = void 0;
|
|
|
13
13
|
/**
|
|
14
14
|
* A string containing the version of the GraphQL.js library
|
|
15
15
|
*/
|
|
16
|
-
var version = '14.5.
|
|
16
|
+
var version = '14.5.4';
|
|
17
17
|
/**
|
|
18
18
|
* An object containing the components of the GraphQL.js version string
|
|
19
19
|
*/
|
|
@@ -22,7 +22,7 @@ exports.version = version;
|
|
|
22
22
|
var versionInfo = Object.freeze({
|
|
23
23
|
major: 14,
|
|
24
24
|
minor: 5,
|
|
25
|
-
patch:
|
|
25
|
+
patch: 4,
|
|
26
26
|
preReleaseTag: null
|
|
27
27
|
});
|
|
28
28
|
exports.versionInfo = versionInfo;
|
package/version.js.flow
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* A string containing the version of the GraphQL.js library
|
|
10
10
|
*/
|
|
11
|
-
export const version = '14.5.
|
|
11
|
+
export const version = '14.5.4';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* An object containing the components of the GraphQL.js version string
|
|
@@ -16,6 +16,6 @@ export const version = '14.5.0';
|
|
|
16
16
|
export const versionInfo = Object.freeze({
|
|
17
17
|
major: 14,
|
|
18
18
|
minor: 5,
|
|
19
|
-
patch:
|
|
19
|
+
patch: 4,
|
|
20
20
|
preReleaseTag: null,
|
|
21
21
|
});
|
package/version.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* A string containing the version of the GraphQL.js library
|
|
8
8
|
*/
|
|
9
|
-
export var version = '14.5.
|
|
9
|
+
export var version = '14.5.4';
|
|
10
10
|
/**
|
|
11
11
|
* An object containing the components of the GraphQL.js version string
|
|
12
12
|
*/
|
|
@@ -14,6 +14,6 @@ export var version = '14.5.0';
|
|
|
14
14
|
export var versionInfo = Object.freeze({
|
|
15
15
|
major: 14,
|
|
16
16
|
minor: 5,
|
|
17
|
-
patch:
|
|
17
|
+
patch: 4,
|
|
18
18
|
preReleaseTag: null
|
|
19
19
|
});
|
package/error/printError.d.ts
DELETED