graphql 14.5.6 → 14.7.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/execution/execute.d.ts +7 -1
- package/execution/execute.js.flow +7 -0
- package/execution/index.d.ts +1 -0
- package/execution/index.js.flow +5 -1
- package/execution/values.js +1 -3
- package/execution/values.js.flow +1 -3
- package/execution/values.mjs +1 -3
- package/index.d.ts +10 -0
- package/index.js +48 -0
- package/index.js.flow +14 -1
- package/index.mjs +2 -1
- package/package.json +2 -2
- package/type/directives.d.ts +1 -3
- package/type/scalars.d.ts +1 -1
- package/validation/index.d.ts +28 -0
- package/validation/index.js +64 -0
- package/validation/index.js.flow +28 -0
- package/validation/index.mjs +12 -2
- package/version.js +3 -3
- package/version.js.flow +3 -3
- package/version.mjs +3 -3
package/execution/execute.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { PromiseOrValue } from '../jsutils/PromiseOrValue';
|
|
|
3
3
|
import { Path, addPath, pathToArray } from '../jsutils/Path';
|
|
4
4
|
|
|
5
5
|
import { GraphQLError } from '../error/GraphQLError';
|
|
6
|
-
import {
|
|
6
|
+
import { GraphQLFormattedError } from '../error/formatError';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
DirectiveNode,
|
|
@@ -56,6 +56,12 @@ export interface ExecutionResult<TData = ExecutionResultDataDefault> {
|
|
|
56
56
|
data?: TData | null;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
export interface FormattedExecutionResult<TData = ExecutionResultDataDefault> {
|
|
60
|
+
errors?: ReadonlyArray<GraphQLFormattedError>;
|
|
61
|
+
// TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229
|
|
62
|
+
data?: TData | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
59
65
|
export type ExecutionArgs = {
|
|
60
66
|
schema: GraphQLSchema;
|
|
61
67
|
document: DocumentNode;
|
|
@@ -16,6 +16,7 @@ import promiseForObject from '../jsutils/promiseForObject';
|
|
|
16
16
|
import { type PromiseOrValue } from '../jsutils/PromiseOrValue';
|
|
17
17
|
import { type Path, addPath, pathToArray } from '../jsutils/Path';
|
|
18
18
|
|
|
19
|
+
import { type GraphQLFormattedError } from '../error/formatError';
|
|
19
20
|
import { GraphQLError } from '../error/GraphQLError';
|
|
20
21
|
import { locatedError } from '../error/locatedError';
|
|
21
22
|
|
|
@@ -117,6 +118,12 @@ export type ExecutionResult = {
|
|
|
117
118
|
...
|
|
118
119
|
};
|
|
119
120
|
|
|
121
|
+
export type FormattedExecutionResult = {|
|
|
122
|
+
errors?: $ReadOnlyArray<GraphQLFormattedError>,
|
|
123
|
+
data?: ObjMap<mixed> | null,
|
|
124
|
+
extensions?: ObjMap<mixed>,
|
|
125
|
+
|};
|
|
126
|
+
|
|
120
127
|
export type ExecutionArgs = {|
|
|
121
128
|
schema: GraphQLSchema,
|
|
122
129
|
document: DocumentNode,
|
package/execution/index.d.ts
CHANGED
package/execution/index.js.flow
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
export { pathToArray as responsePathAsArray } from '../jsutils/Path';
|
|
4
4
|
|
|
5
5
|
export { execute, defaultFieldResolver, defaultTypeResolver } from './execute';
|
|
6
|
-
export type {
|
|
6
|
+
export type {
|
|
7
|
+
ExecutionArgs,
|
|
8
|
+
ExecutionResult,
|
|
9
|
+
FormattedExecutionResult,
|
|
10
|
+
} from './execute';
|
|
7
11
|
|
|
8
12
|
export { getDirectiveValues } from './values';
|
package/execution/values.js
CHANGED
|
@@ -86,9 +86,7 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
86
86
|
if (!hasOwnProperty(inputs, varName)) {
|
|
87
87
|
if (varDefNode.defaultValue) {
|
|
88
88
|
coercedValues[varName] = (0, _valueFromAST.valueFromAST)(varDefNode.defaultValue, varType);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if ((0, _definition.isNonNullType)(varType)) {
|
|
89
|
+
} else if ((0, _definition.isNonNullType)(varType)) {
|
|
92
90
|
var _varTypeStr = (0, _inspect.default)(varType);
|
|
93
91
|
|
|
94
92
|
onError(new _GraphQLError.GraphQLError("Variable \"$".concat(varName, "\" of required type \"").concat(_varTypeStr, "\" was not provided."), varDefNode));
|
package/execution/values.js.flow
CHANGED
|
@@ -96,9 +96,7 @@ function coerceVariableValues(
|
|
|
96
96
|
if (!hasOwnProperty(inputs, varName)) {
|
|
97
97
|
if (varDefNode.defaultValue) {
|
|
98
98
|
coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (isNonNullType(varType)) {
|
|
99
|
+
} else if (isNonNullType(varType)) {
|
|
102
100
|
const varTypeStr = inspect(varType);
|
|
103
101
|
onError(
|
|
104
102
|
new GraphQLError(
|
package/execution/values.mjs
CHANGED
|
@@ -65,9 +65,7 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
65
65
|
if (!hasOwnProperty(inputs, varName)) {
|
|
66
66
|
if (varDefNode.defaultValue) {
|
|
67
67
|
coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (isNonNullType(varType)) {
|
|
68
|
+
} else if (isNonNullType(varType)) {
|
|
71
69
|
var _varTypeStr = inspect(varType);
|
|
72
70
|
|
|
73
71
|
onError(new GraphQLError("Variable \"$".concat(varName, "\" of required type \"").concat(_varTypeStr, "\" was not provided."), varDefNode));
|
package/index.d.ts
CHANGED
|
@@ -287,6 +287,7 @@ export {
|
|
|
287
287
|
getDirectiveValues,
|
|
288
288
|
ExecutionArgs,
|
|
289
289
|
ExecutionResult,
|
|
290
|
+
FormattedExecutionResult,
|
|
290
291
|
} from './execution';
|
|
291
292
|
|
|
292
293
|
export {
|
|
@@ -302,6 +303,7 @@ export {
|
|
|
302
303
|
// All validation rules in the GraphQL Specification.
|
|
303
304
|
specifiedRules,
|
|
304
305
|
// Individual validation rules.
|
|
306
|
+
ExecutableDefinitionsRule,
|
|
305
307
|
FieldsOnCorrectTypeRule,
|
|
306
308
|
FragmentsOnCompositeTypesRule,
|
|
307
309
|
KnownArgumentNamesRule,
|
|
@@ -327,6 +329,14 @@ export {
|
|
|
327
329
|
ValuesOfCorrectTypeRule,
|
|
328
330
|
VariablesAreInputTypesRule,
|
|
329
331
|
VariablesInAllowedPositionRule,
|
|
332
|
+
// SDL-specific validation rules
|
|
333
|
+
LoneSchemaDefinitionRule,
|
|
334
|
+
UniqueOperationTypesRule,
|
|
335
|
+
UniqueTypeNamesRule,
|
|
336
|
+
UniqueEnumValueNamesRule,
|
|
337
|
+
UniqueFieldDefinitionNamesRule,
|
|
338
|
+
UniqueDirectiveNamesRule,
|
|
339
|
+
PossibleTypeExtensionsRule,
|
|
330
340
|
ValidationRule,
|
|
331
341
|
} from './validation';
|
|
332
342
|
|
package/index.js
CHANGED
|
@@ -729,6 +729,12 @@ Object.defineProperty(exports, "specifiedRules", {
|
|
|
729
729
|
return _validation.specifiedRules;
|
|
730
730
|
}
|
|
731
731
|
});
|
|
732
|
+
Object.defineProperty(exports, "ExecutableDefinitionsRule", {
|
|
733
|
+
enumerable: true,
|
|
734
|
+
get: function get() {
|
|
735
|
+
return _validation.ExecutableDefinitionsRule;
|
|
736
|
+
}
|
|
737
|
+
});
|
|
732
738
|
Object.defineProperty(exports, "FieldsOnCorrectTypeRule", {
|
|
733
739
|
enumerable: true,
|
|
734
740
|
get: function get() {
|
|
@@ -879,6 +885,48 @@ Object.defineProperty(exports, "VariablesInAllowedPositionRule", {
|
|
|
879
885
|
return _validation.VariablesInAllowedPositionRule;
|
|
880
886
|
}
|
|
881
887
|
});
|
|
888
|
+
Object.defineProperty(exports, "LoneSchemaDefinitionRule", {
|
|
889
|
+
enumerable: true,
|
|
890
|
+
get: function get() {
|
|
891
|
+
return _validation.LoneSchemaDefinitionRule;
|
|
892
|
+
}
|
|
893
|
+
});
|
|
894
|
+
Object.defineProperty(exports, "UniqueOperationTypesRule", {
|
|
895
|
+
enumerable: true,
|
|
896
|
+
get: function get() {
|
|
897
|
+
return _validation.UniqueOperationTypesRule;
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
Object.defineProperty(exports, "UniqueTypeNamesRule", {
|
|
901
|
+
enumerable: true,
|
|
902
|
+
get: function get() {
|
|
903
|
+
return _validation.UniqueTypeNamesRule;
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
Object.defineProperty(exports, "UniqueEnumValueNamesRule", {
|
|
907
|
+
enumerable: true,
|
|
908
|
+
get: function get() {
|
|
909
|
+
return _validation.UniqueEnumValueNamesRule;
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", {
|
|
913
|
+
enumerable: true,
|
|
914
|
+
get: function get() {
|
|
915
|
+
return _validation.UniqueFieldDefinitionNamesRule;
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
Object.defineProperty(exports, "UniqueDirectiveNamesRule", {
|
|
919
|
+
enumerable: true,
|
|
920
|
+
get: function get() {
|
|
921
|
+
return _validation.UniqueDirectiveNamesRule;
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
|
+
Object.defineProperty(exports, "PossibleTypeExtensionsRule", {
|
|
925
|
+
enumerable: true,
|
|
926
|
+
get: function get() {
|
|
927
|
+
return _validation.PossibleTypeExtensionsRule;
|
|
928
|
+
}
|
|
929
|
+
});
|
|
882
930
|
Object.defineProperty(exports, "GraphQLError", {
|
|
883
931
|
enumerable: true,
|
|
884
932
|
get: function get() {
|
package/index.js.flow
CHANGED
|
@@ -288,7 +288,11 @@ export {
|
|
|
288
288
|
getDirectiveValues,
|
|
289
289
|
} from './execution';
|
|
290
290
|
|
|
291
|
-
export type {
|
|
291
|
+
export type {
|
|
292
|
+
ExecutionArgs,
|
|
293
|
+
ExecutionResult,
|
|
294
|
+
FormattedExecutionResult,
|
|
295
|
+
} from './execution';
|
|
292
296
|
|
|
293
297
|
export { subscribe, createSourceEventStream } from './subscription';
|
|
294
298
|
export type { SubscriptionArgs } from './subscription';
|
|
@@ -300,6 +304,7 @@ export {
|
|
|
300
304
|
// All validation rules in the GraphQL Specification.
|
|
301
305
|
specifiedRules,
|
|
302
306
|
// Individual validation rules.
|
|
307
|
+
ExecutableDefinitionsRule,
|
|
303
308
|
FieldsOnCorrectTypeRule,
|
|
304
309
|
FragmentsOnCompositeTypesRule,
|
|
305
310
|
KnownArgumentNamesRule,
|
|
@@ -325,6 +330,14 @@ export {
|
|
|
325
330
|
ValuesOfCorrectTypeRule,
|
|
326
331
|
VariablesAreInputTypesRule,
|
|
327
332
|
VariablesInAllowedPositionRule,
|
|
333
|
+
// SDL-specific validation rules
|
|
334
|
+
LoneSchemaDefinitionRule,
|
|
335
|
+
UniqueOperationTypesRule,
|
|
336
|
+
UniqueTypeNamesRule,
|
|
337
|
+
UniqueEnumValueNamesRule,
|
|
338
|
+
UniqueFieldDefinitionNamesRule,
|
|
339
|
+
UniqueDirectiveNamesRule,
|
|
340
|
+
PossibleTypeExtensionsRule,
|
|
328
341
|
} from './validation';
|
|
329
342
|
|
|
330
343
|
export type { ValidationRule } from './validation';
|
package/index.mjs
CHANGED
|
@@ -52,7 +52,8 @@ export { subscribe, createSourceEventStream } from './subscription';
|
|
|
52
52
|
// Validate GraphQL documents.
|
|
53
53
|
export { validate, ValidationContext, // All validation rules in the GraphQL Specification.
|
|
54
54
|
specifiedRules, // Individual validation rules.
|
|
55
|
-
FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule
|
|
55
|
+
ExecutableDefinitionsRule, FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule, // SDL-specific validation rules
|
|
56
|
+
LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueDirectiveNamesRule, PossibleTypeExtensionsRule } from './validation';
|
|
56
57
|
// Create, format, and print GraphQL errors.
|
|
57
58
|
export { GraphQLError, syntaxError, locatedError, printError, formatError } from './error';
|
|
58
59
|
// Utilities for operating on GraphQL type schema and parsed sources.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.7.0",
|
|
4
4
|
"description": "A Query Language and Runtime which can target any service.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index",
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"iterall": "^1.2.2"
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|
package/type/directives.d.ts
CHANGED
|
@@ -67,6 +67,4 @@ export const GraphQLDeprecatedDirective: GraphQLDirective;
|
|
|
67
67
|
*/
|
|
68
68
|
export const specifiedDirectives: ReadonlyArray<GraphQLDirective>;
|
|
69
69
|
|
|
70
|
-
export function isSpecifiedDirective(
|
|
71
|
-
directive: any,
|
|
72
|
-
): directive is GraphQLDirective;
|
|
70
|
+
export function isSpecifiedDirective(directive: any): boolean;
|
package/type/scalars.d.ts
CHANGED
package/validation/index.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ export { ValidationContext, ValidationRule } from './ValidationContext';
|
|
|
4
4
|
|
|
5
5
|
export { specifiedRules } from './specifiedRules';
|
|
6
6
|
|
|
7
|
+
// Spec Section: "Executable Definitions"
|
|
8
|
+
export {
|
|
9
|
+
ExecutableDefinitions as ExecutableDefinitionsRule,
|
|
10
|
+
} from './rules/ExecutableDefinitions';
|
|
11
|
+
|
|
7
12
|
// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
|
|
8
13
|
export {
|
|
9
14
|
FieldsOnCorrectType as FieldsOnCorrectTypeRule,
|
|
@@ -124,3 +129,26 @@ export {
|
|
|
124
129
|
export {
|
|
125
130
|
VariablesInAllowedPosition as VariablesInAllowedPositionRule,
|
|
126
131
|
} from './rules/VariablesInAllowedPosition';
|
|
132
|
+
|
|
133
|
+
// SDL-specific validation rules
|
|
134
|
+
export {
|
|
135
|
+
LoneSchemaDefinition as LoneSchemaDefinitionRule,
|
|
136
|
+
} from './rules/LoneSchemaDefinition';
|
|
137
|
+
export {
|
|
138
|
+
UniqueOperationTypes as UniqueOperationTypesRule,
|
|
139
|
+
} from './rules/UniqueOperationTypes';
|
|
140
|
+
export {
|
|
141
|
+
UniqueTypeNames as UniqueTypeNamesRule,
|
|
142
|
+
} from './rules/UniqueTypeNames';
|
|
143
|
+
export {
|
|
144
|
+
UniqueEnumValueNames as UniqueEnumValueNamesRule,
|
|
145
|
+
} from './rules/UniqueEnumValueNames';
|
|
146
|
+
export {
|
|
147
|
+
UniqueFieldDefinitionNames as UniqueFieldDefinitionNamesRule,
|
|
148
|
+
} from './rules/UniqueFieldDefinitionNames';
|
|
149
|
+
export {
|
|
150
|
+
UniqueDirectiveNames as UniqueDirectiveNamesRule,
|
|
151
|
+
} from './rules/UniqueDirectiveNames';
|
|
152
|
+
export {
|
|
153
|
+
PossibleTypeExtensions as PossibleTypeExtensionsRule,
|
|
154
|
+
} from './rules/PossibleTypeExtensions';
|
package/validation/index.js
CHANGED
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "specifiedRules", {
|
|
|
21
21
|
return _specifiedRules.specifiedRules;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "ExecutableDefinitionsRule", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _ExecutableDefinitions.ExecutableDefinitions;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "FieldsOnCorrectTypeRule", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function get() {
|
|
@@ -171,6 +177,48 @@ Object.defineProperty(exports, "VariablesInAllowedPositionRule", {
|
|
|
171
177
|
return _VariablesInAllowedPosition.VariablesInAllowedPosition;
|
|
172
178
|
}
|
|
173
179
|
});
|
|
180
|
+
Object.defineProperty(exports, "LoneSchemaDefinitionRule", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function get() {
|
|
183
|
+
return _LoneSchemaDefinition.LoneSchemaDefinition;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
Object.defineProperty(exports, "UniqueOperationTypesRule", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function get() {
|
|
189
|
+
return _UniqueOperationTypes.UniqueOperationTypes;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "UniqueTypeNamesRule", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function get() {
|
|
195
|
+
return _UniqueTypeNames.UniqueTypeNames;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "UniqueEnumValueNamesRule", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function get() {
|
|
201
|
+
return _UniqueEnumValueNames.UniqueEnumValueNames;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function get() {
|
|
207
|
+
return _UniqueFieldDefinitionNames.UniqueFieldDefinitionNames;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "UniqueDirectiveNamesRule", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function get() {
|
|
213
|
+
return _UniqueDirectiveNames.UniqueDirectiveNames;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "PossibleTypeExtensionsRule", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function get() {
|
|
219
|
+
return _PossibleTypeExtensions.PossibleTypeExtensions;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
174
222
|
|
|
175
223
|
var _validate = require("./validate");
|
|
176
224
|
|
|
@@ -178,6 +226,8 @@ var _ValidationContext = require("./ValidationContext");
|
|
|
178
226
|
|
|
179
227
|
var _specifiedRules = require("./specifiedRules");
|
|
180
228
|
|
|
229
|
+
var _ExecutableDefinitions = require("./rules/ExecutableDefinitions");
|
|
230
|
+
|
|
181
231
|
var _FieldsOnCorrectType = require("./rules/FieldsOnCorrectType");
|
|
182
232
|
|
|
183
233
|
var _FragmentsOnCompositeTypes = require("./rules/FragmentsOnCompositeTypes");
|
|
@@ -227,3 +277,17 @@ var _ValuesOfCorrectType = require("./rules/ValuesOfCorrectType");
|
|
|
227
277
|
var _VariablesAreInputTypes = require("./rules/VariablesAreInputTypes");
|
|
228
278
|
|
|
229
279
|
var _VariablesInAllowedPosition = require("./rules/VariablesInAllowedPosition");
|
|
280
|
+
|
|
281
|
+
var _LoneSchemaDefinition = require("./rules/LoneSchemaDefinition");
|
|
282
|
+
|
|
283
|
+
var _UniqueOperationTypes = require("./rules/UniqueOperationTypes");
|
|
284
|
+
|
|
285
|
+
var _UniqueTypeNames = require("./rules/UniqueTypeNames");
|
|
286
|
+
|
|
287
|
+
var _UniqueEnumValueNames = require("./rules/UniqueEnumValueNames");
|
|
288
|
+
|
|
289
|
+
var _UniqueFieldDefinitionNames = require("./rules/UniqueFieldDefinitionNames");
|
|
290
|
+
|
|
291
|
+
var _UniqueDirectiveNames = require("./rules/UniqueDirectiveNames");
|
|
292
|
+
|
|
293
|
+
var _PossibleTypeExtensions = require("./rules/PossibleTypeExtensions");
|
package/validation/index.js.flow
CHANGED
|
@@ -8,6 +8,11 @@ export type { ValidationRule } from './ValidationContext';
|
|
|
8
8
|
// All validation rules in the GraphQL Specification.
|
|
9
9
|
export { specifiedRules } from './specifiedRules';
|
|
10
10
|
|
|
11
|
+
// Spec Section: "Executable Definitions"
|
|
12
|
+
export {
|
|
13
|
+
ExecutableDefinitions as ExecutableDefinitionsRule,
|
|
14
|
+
} from './rules/ExecutableDefinitions';
|
|
15
|
+
|
|
11
16
|
// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
|
|
12
17
|
export {
|
|
13
18
|
FieldsOnCorrectType as FieldsOnCorrectTypeRule,
|
|
@@ -128,3 +133,26 @@ export {
|
|
|
128
133
|
export {
|
|
129
134
|
VariablesInAllowedPosition as VariablesInAllowedPositionRule,
|
|
130
135
|
} from './rules/VariablesInAllowedPosition';
|
|
136
|
+
|
|
137
|
+
// SDL-specific validation rules
|
|
138
|
+
export {
|
|
139
|
+
LoneSchemaDefinition as LoneSchemaDefinitionRule,
|
|
140
|
+
} from './rules/LoneSchemaDefinition';
|
|
141
|
+
export {
|
|
142
|
+
UniqueOperationTypes as UniqueOperationTypesRule,
|
|
143
|
+
} from './rules/UniqueOperationTypes';
|
|
144
|
+
export {
|
|
145
|
+
UniqueTypeNames as UniqueTypeNamesRule,
|
|
146
|
+
} from './rules/UniqueTypeNames';
|
|
147
|
+
export {
|
|
148
|
+
UniqueEnumValueNames as UniqueEnumValueNamesRule,
|
|
149
|
+
} from './rules/UniqueEnumValueNames';
|
|
150
|
+
export {
|
|
151
|
+
UniqueFieldDefinitionNames as UniqueFieldDefinitionNamesRule,
|
|
152
|
+
} from './rules/UniqueFieldDefinitionNames';
|
|
153
|
+
export {
|
|
154
|
+
UniqueDirectiveNames as UniqueDirectiveNamesRule,
|
|
155
|
+
} from './rules/UniqueDirectiveNames';
|
|
156
|
+
export {
|
|
157
|
+
PossibleTypeExtensions as PossibleTypeExtensionsRule,
|
|
158
|
+
} from './rules/PossibleTypeExtensions';
|
package/validation/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { validate } from './validate';
|
|
2
2
|
export { ValidationContext } from './ValidationContext';
|
|
3
3
|
// All validation rules in the GraphQL Specification.
|
|
4
|
-
export { specifiedRules } from './specifiedRules'; // Spec Section: "
|
|
4
|
+
export { specifiedRules } from './specifiedRules'; // Spec Section: "Executable Definitions"
|
|
5
|
+
|
|
6
|
+
export { ExecutableDefinitions as ExecutableDefinitionsRule } from './rules/ExecutableDefinitions'; // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
|
|
5
7
|
|
|
6
8
|
export { FieldsOnCorrectType as FieldsOnCorrectTypeRule } from './rules/FieldsOnCorrectType'; // Spec Section: "Fragments on Composite Types"
|
|
7
9
|
|
|
@@ -51,4 +53,12 @@ export { ValuesOfCorrectType as ValuesOfCorrectTypeRule } from './rules/ValuesOf
|
|
|
51
53
|
|
|
52
54
|
export { VariablesAreInputTypes as VariablesAreInputTypesRule } from './rules/VariablesAreInputTypes'; // Spec Section: "All Variable Usages Are Allowed"
|
|
53
55
|
|
|
54
|
-
export { VariablesInAllowedPosition as VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPosition';
|
|
56
|
+
export { VariablesInAllowedPosition as VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPosition'; // SDL-specific validation rules
|
|
57
|
+
|
|
58
|
+
export { LoneSchemaDefinition as LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinition';
|
|
59
|
+
export { UniqueOperationTypes as UniqueOperationTypesRule } from './rules/UniqueOperationTypes';
|
|
60
|
+
export { UniqueTypeNames as UniqueTypeNamesRule } from './rules/UniqueTypeNames';
|
|
61
|
+
export { UniqueEnumValueNames as UniqueEnumValueNamesRule } from './rules/UniqueEnumValueNames';
|
|
62
|
+
export { UniqueFieldDefinitionNames as UniqueFieldDefinitionNamesRule } from './rules/UniqueFieldDefinitionNames';
|
|
63
|
+
export { UniqueDirectiveNames as UniqueDirectiveNamesRule } from './rules/UniqueDirectiveNames';
|
|
64
|
+
export { PossibleTypeExtensions as PossibleTypeExtensionsRule } from './rules/PossibleTypeExtensions';
|
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.
|
|
16
|
+
var version = '14.7.0';
|
|
17
17
|
/**
|
|
18
18
|
* An object containing the components of the GraphQL.js version string
|
|
19
19
|
*/
|
|
@@ -21,8 +21,8 @@ var version = '14.5.6';
|
|
|
21
21
|
exports.version = version;
|
|
22
22
|
var versionInfo = Object.freeze({
|
|
23
23
|
major: 14,
|
|
24
|
-
minor:
|
|
25
|
-
patch:
|
|
24
|
+
minor: 7,
|
|
25
|
+
patch: 0,
|
|
26
26
|
preReleaseTag: null
|
|
27
27
|
});
|
|
28
28
|
exports.versionInfo = versionInfo;
|
package/version.js.flow
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* A string containing the version of the GraphQL.js library
|
|
10
10
|
*/
|
|
11
|
-
export const version = '14.
|
|
11
|
+
export const version = '14.7.0';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* An object containing the components of the GraphQL.js version string
|
|
15
15
|
*/
|
|
16
16
|
export const versionInfo = Object.freeze({
|
|
17
17
|
major: 14,
|
|
18
|
-
minor:
|
|
19
|
-
patch:
|
|
18
|
+
minor: 7,
|
|
19
|
+
patch: 0,
|
|
20
20
|
preReleaseTag: null,
|
|
21
21
|
});
|
package/version.mjs
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* A string containing the version of the GraphQL.js library
|
|
8
8
|
*/
|
|
9
|
-
export var version = '14.
|
|
9
|
+
export var version = '14.7.0';
|
|
10
10
|
/**
|
|
11
11
|
* An object containing the components of the GraphQL.js version string
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
export var versionInfo = Object.freeze({
|
|
15
15
|
major: 14,
|
|
16
|
-
minor:
|
|
17
|
-
patch:
|
|
16
|
+
minor: 7,
|
|
17
|
+
patch: 0,
|
|
18
18
|
preReleaseTag: null
|
|
19
19
|
});
|