graphql 16.8.1 → 16.9.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/index.d.ts +3 -0
- package/index.js +18 -0
- package/index.mjs +6 -3
- package/jsutils/instanceOf.js +6 -1
- package/jsutils/instanceOf.mjs +6 -1
- package/package.json +1 -1
- package/type/definition.d.ts +4 -1
- package/type/definition.js +29 -6
- package/type/definition.mjs +26 -6
- package/type/directives.d.ts +4 -0
- package/type/directives.js +15 -1
- package/type/directives.mjs +12 -0
- package/type/index.d.ts +1 -0
- package/type/index.js +6 -0
- package/type/index.mjs +2 -1
- package/type/introspection.js +8 -0
- package/type/introspection.mjs +8 -0
- package/type/validate.js +24 -0
- package/type/validate.mjs +24 -0
- package/utilities/buildClientSchema.js +1 -0
- package/utilities/buildClientSchema.mjs +1 -0
- package/utilities/coerceInputValue.js +25 -0
- package/utilities/coerceInputValue.mjs +25 -0
- package/utilities/extendSchema.js +10 -0
- package/utilities/extendSchema.mjs +9 -0
- package/utilities/getIntrospectionQuery.d.ts +6 -0
- package/utilities/getIntrospectionQuery.js +3 -0
- package/utilities/getIntrospectionQuery.mjs +3 -0
- package/utilities/introspectionFromSchema.js +1 -0
- package/utilities/introspectionFromSchema.mjs +1 -0
- package/utilities/printSchema.js +6 -1
- package/utilities/printSchema.mjs +6 -1
- package/utilities/valueFromAST.js +12 -0
- package/utilities/valueFromAST.mjs +12 -0
- package/validation/index.d.ts +2 -1
- package/validation/index.js +14 -0
- package/validation/index.mjs +3 -2
- package/validation/rules/MaxIntrospectionDepthRule.d.ts +5 -0
- package/validation/rules/MaxIntrospectionDepthRule.js +90 -0
- package/validation/rules/MaxIntrospectionDepthRule.mjs +77 -0
- package/validation/rules/ValuesOfCorrectTypeRule.js +88 -0
- package/validation/rules/ValuesOfCorrectTypeRule.mjs +83 -0
- package/validation/specifiedRules.d.ts +6 -0
- package/validation/specifiedRules.js +17 -1
- package/validation/specifiedRules.mjs +10 -1
- package/version.js +3 -3
- package/version.mjs +3 -3
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true,
|
|
5
5
|
});
|
|
6
|
-
exports.specifiedSDLRules =
|
|
6
|
+
exports.specifiedSDLRules =
|
|
7
|
+
exports.specifiedRules =
|
|
8
|
+
exports.recommendedRules =
|
|
9
|
+
void 0;
|
|
7
10
|
|
|
8
11
|
var _ExecutableDefinitionsRule = require('./rules/ExecutableDefinitionsRule.js');
|
|
9
12
|
|
|
@@ -23,6 +26,8 @@ var _LoneAnonymousOperationRule = require('./rules/LoneAnonymousOperationRule.js
|
|
|
23
26
|
|
|
24
27
|
var _LoneSchemaDefinitionRule = require('./rules/LoneSchemaDefinitionRule.js');
|
|
25
28
|
|
|
29
|
+
var _MaxIntrospectionDepthRule = require('./rules/MaxIntrospectionDepthRule.js');
|
|
30
|
+
|
|
26
31
|
var _NoFragmentCyclesRule = require('./rules/NoFragmentCyclesRule.js');
|
|
27
32
|
|
|
28
33
|
var _NoUndefinedVariablesRule = require('./rules/NoUndefinedVariablesRule.js');
|
|
@@ -82,6 +87,7 @@ var _VariablesInAllowedPositionRule = require('./rules/VariablesInAllowedPositio
|
|
|
82
87
|
// Spec Section: "Fragment Spread Type Existence"
|
|
83
88
|
// Spec Section: "Lone Anonymous Operation"
|
|
84
89
|
// SDL-specific validation rules
|
|
90
|
+
// TODO: Spec Section
|
|
85
91
|
// Spec Section: "Fragments must not form cycles"
|
|
86
92
|
// Spec Section: "All Variable Used Defined"
|
|
87
93
|
// Spec Section: "Fragments must be used"
|
|
@@ -101,12 +107,21 @@ var _VariablesInAllowedPositionRule = require('./rules/VariablesInAllowedPositio
|
|
|
101
107
|
// Spec Section: "Variables are Input Types"
|
|
102
108
|
// Spec Section: "All Variable Usages Are Allowed"
|
|
103
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Technically these aren't part of the spec but they are strongly encouraged
|
|
112
|
+
* validation rules.
|
|
113
|
+
*/
|
|
114
|
+
const recommendedRules = Object.freeze([
|
|
115
|
+
_MaxIntrospectionDepthRule.MaxIntrospectionDepthRule,
|
|
116
|
+
]);
|
|
104
117
|
/**
|
|
105
118
|
* This set includes all validation rules defined by the GraphQL spec.
|
|
106
119
|
*
|
|
107
120
|
* The order of the rules in this list has been adjusted to lead to the
|
|
108
121
|
* most clear output when encountering multiple validation errors.
|
|
109
122
|
*/
|
|
123
|
+
|
|
124
|
+
exports.recommendedRules = recommendedRules;
|
|
110
125
|
const specifiedRules = Object.freeze([
|
|
111
126
|
_ExecutableDefinitionsRule.ExecutableDefinitionsRule,
|
|
112
127
|
_UniqueOperationNamesRule.UniqueOperationNamesRule,
|
|
@@ -134,6 +149,7 @@ const specifiedRules = Object.freeze([
|
|
|
134
149
|
_VariablesInAllowedPositionRule.VariablesInAllowedPositionRule,
|
|
135
150
|
_OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule,
|
|
136
151
|
_UniqueInputFieldNamesRule.UniqueInputFieldNamesRule,
|
|
152
|
+
...recommendedRules,
|
|
137
153
|
]);
|
|
138
154
|
/**
|
|
139
155
|
* @internal
|
|
@@ -18,7 +18,9 @@ import { KnownTypeNamesRule } from './rules/KnownTypeNamesRule.mjs'; // Spec Sec
|
|
|
18
18
|
|
|
19
19
|
import { LoneAnonymousOperationRule } from './rules/LoneAnonymousOperationRule.mjs'; // SDL-specific validation rules
|
|
20
20
|
|
|
21
|
-
import { LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinitionRule.mjs'; // Spec Section
|
|
21
|
+
import { LoneSchemaDefinitionRule } from './rules/LoneSchemaDefinitionRule.mjs'; // TODO: Spec Section
|
|
22
|
+
|
|
23
|
+
import { MaxIntrospectionDepthRule } from './rules/MaxIntrospectionDepthRule.mjs'; // Spec Section: "Fragments must not form cycles"
|
|
22
24
|
|
|
23
25
|
import { NoFragmentCyclesRule } from './rules/NoFragmentCyclesRule.mjs'; // Spec Section: "All Variable Used Defined"
|
|
24
26
|
|
|
@@ -66,12 +68,18 @@ import { VariablesAreInputTypesRule } from './rules/VariablesAreInputTypesRule.m
|
|
|
66
68
|
|
|
67
69
|
import { VariablesInAllowedPositionRule } from './rules/VariablesInAllowedPositionRule.mjs';
|
|
68
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Technically these aren't part of the spec but they are strongly encouraged
|
|
73
|
+
* validation rules.
|
|
74
|
+
*/
|
|
75
|
+
export const recommendedRules = Object.freeze([MaxIntrospectionDepthRule]);
|
|
69
76
|
/**
|
|
70
77
|
* This set includes all validation rules defined by the GraphQL spec.
|
|
71
78
|
*
|
|
72
79
|
* The order of the rules in this list has been adjusted to lead to the
|
|
73
80
|
* most clear output when encountering multiple validation errors.
|
|
74
81
|
*/
|
|
82
|
+
|
|
75
83
|
export const specifiedRules = Object.freeze([
|
|
76
84
|
ExecutableDefinitionsRule,
|
|
77
85
|
UniqueOperationNamesRule,
|
|
@@ -99,6 +107,7 @@ export const specifiedRules = Object.freeze([
|
|
|
99
107
|
VariablesInAllowedPositionRule,
|
|
100
108
|
OverlappingFieldsCanBeMergedRule,
|
|
101
109
|
UniqueInputFieldNamesRule,
|
|
110
|
+
...recommendedRules,
|
|
102
111
|
]);
|
|
103
112
|
/**
|
|
104
113
|
* @internal
|
package/version.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.versionInfo = exports.version = void 0;
|
|
|
10
10
|
/**
|
|
11
11
|
* A string containing the version of the GraphQL.js library
|
|
12
12
|
*/
|
|
13
|
-
const version = '16.
|
|
13
|
+
const version = '16.9.0';
|
|
14
14
|
/**
|
|
15
15
|
* An object containing the components of the GraphQL.js version string
|
|
16
16
|
*/
|
|
@@ -18,8 +18,8 @@ const version = '16.8.1';
|
|
|
18
18
|
exports.version = version;
|
|
19
19
|
const versionInfo = Object.freeze({
|
|
20
20
|
major: 16,
|
|
21
|
-
minor:
|
|
22
|
-
patch:
|
|
21
|
+
minor: 9,
|
|
22
|
+
patch: 0,
|
|
23
23
|
preReleaseTag: null,
|
|
24
24
|
});
|
|
25
25
|
exports.versionInfo = versionInfo;
|
package/version.mjs
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* A string containing the version of the GraphQL.js library
|
|
6
6
|
*/
|
|
7
|
-
export const version = '16.
|
|
7
|
+
export const version = '16.9.0';
|
|
8
8
|
/**
|
|
9
9
|
* An object containing the components of the GraphQL.js version string
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
export const versionInfo = Object.freeze({
|
|
13
13
|
major: 16,
|
|
14
|
-
minor:
|
|
15
|
-
patch:
|
|
14
|
+
minor: 9,
|
|
15
|
+
patch: 0,
|
|
16
16
|
preReleaseTag: null,
|
|
17
17
|
});
|