graphql 16.13.1 → 16.13.2
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/values.js +4 -4
- package/execution/values.mjs +4 -4
- package/package.json +1 -1
- package/utilities/coerceInputValue.js +2 -2
- package/utilities/coerceInputValue.mjs +2 -2
- package/validation/rules/ValuesOfCorrectTypeRule.js +0 -11
- package/validation/rules/ValuesOfCorrectTypeRule.mjs +0 -11
- package/version.js +2 -2
- package/version.mjs +2 -2
package/execution/values.js
CHANGED
|
@@ -72,7 +72,7 @@ function getVariableValues(schema, varDefNodes, inputs, options) {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
75
|
-
const coercedValues =
|
|
75
|
+
const coercedValues = Object.create(null);
|
|
76
76
|
|
|
77
77
|
for (const varDefNode of varDefNodes) {
|
|
78
78
|
const varName = varDefNode.variable.name.value;
|
|
@@ -153,7 +153,7 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
return coercedValues;
|
|
156
|
+
return { ...coercedValues };
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Prepares an object map of argument values given a list of argument
|
|
@@ -167,7 +167,7 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
167
167
|
function getArgumentValues(def, node, variableValues) {
|
|
168
168
|
var _node$arguments;
|
|
169
169
|
|
|
170
|
-
const coercedValues =
|
|
170
|
+
const coercedValues = Object.create(null); // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
171
171
|
|
|
172
172
|
/* c8 ignore next */
|
|
173
173
|
|
|
@@ -266,7 +266,7 @@ function getArgumentValues(def, node, variableValues) {
|
|
|
266
266
|
coercedValues[name] = coercedValue;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
return coercedValues;
|
|
269
|
+
return { ...coercedValues };
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
272
|
* Prepares an object map of argument values given a directive definition
|
package/execution/values.mjs
CHANGED
|
@@ -54,7 +54,7 @@ export function getVariableValues(schema, varDefNodes, inputs, options) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
57
|
-
const coercedValues =
|
|
57
|
+
const coercedValues = Object.create(null);
|
|
58
58
|
|
|
59
59
|
for (const varDefNode of varDefNodes) {
|
|
60
60
|
const varName = varDefNode.variable.name.value;
|
|
@@ -129,7 +129,7 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
return coercedValues;
|
|
132
|
+
return { ...coercedValues };
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
* Prepares an object map of argument values given a list of argument
|
|
@@ -143,7 +143,7 @@ function coerceVariableValues(schema, varDefNodes, inputs, onError) {
|
|
|
143
143
|
export function getArgumentValues(def, node, variableValues) {
|
|
144
144
|
var _node$arguments;
|
|
145
145
|
|
|
146
|
-
const coercedValues =
|
|
146
|
+
const coercedValues = Object.create(null); // FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
147
147
|
|
|
148
148
|
/* c8 ignore next */
|
|
149
149
|
|
|
@@ -229,7 +229,7 @@ export function getArgumentValues(def, node, variableValues) {
|
|
|
229
229
|
coercedValues[name] = coercedValue;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
return coercedValues;
|
|
232
|
+
return { ...coercedValues };
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
235
|
* Prepares an object map of argument values given a directive definition
|
package/package.json
CHANGED
|
@@ -94,7 +94,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
|
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
const coercedValue =
|
|
97
|
+
const coercedValue = Object.create(null);
|
|
98
98
|
const fieldDefs = type.getFields();
|
|
99
99
|
|
|
100
100
|
for (const field of Object.values(fieldDefs)) {
|
|
@@ -167,7 +167,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
return coercedValue;
|
|
170
|
+
return { ...coercedValue };
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
if ((0, _definition.isLeafType)(type)) {
|
|
@@ -76,7 +76,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
const coercedValue =
|
|
79
|
+
const coercedValue = Object.create(null);
|
|
80
80
|
const fieldDefs = type.getFields();
|
|
81
81
|
|
|
82
82
|
for (const field of Object.values(fieldDefs)) {
|
|
@@ -149,7 +149,7 @@ function coerceInputValueImpl(inputValue, type, onError, path) {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
return coercedValue;
|
|
152
|
+
return { ...coercedValue };
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
if (isLeafType(type)) {
|
|
@@ -30,18 +30,7 @@ var _definition = require('../../type/definition.js');
|
|
|
30
30
|
* See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type
|
|
31
31
|
*/
|
|
32
32
|
function ValuesOfCorrectTypeRule(context) {
|
|
33
|
-
let variableDefinitions = {};
|
|
34
33
|
return {
|
|
35
|
-
OperationDefinition: {
|
|
36
|
-
enter() {
|
|
37
|
-
variableDefinitions = {};
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
VariableDefinition(definition) {
|
|
42
|
-
variableDefinitions[definition.variable.name.value] = definition;
|
|
43
|
-
},
|
|
44
|
-
|
|
45
34
|
ListValue(node) {
|
|
46
35
|
// Note: TypeInfo will traverse into a list's item type, so look to the
|
|
47
36
|
// parent input type to check if it is a list.
|
|
@@ -24,18 +24,7 @@ import {
|
|
|
24
24
|
* See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type
|
|
25
25
|
*/
|
|
26
26
|
export function ValuesOfCorrectTypeRule(context) {
|
|
27
|
-
let variableDefinitions = {};
|
|
28
27
|
return {
|
|
29
|
-
OperationDefinition: {
|
|
30
|
-
enter() {
|
|
31
|
-
variableDefinitions = {};
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
VariableDefinition(definition) {
|
|
36
|
-
variableDefinitions[definition.variable.name.value] = definition;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
28
|
ListValue(node) {
|
|
40
29
|
// Note: TypeInfo will traverse into a list's item type, so look to the
|
|
41
30
|
// parent input type to check if it is a list.
|
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.
|
|
13
|
+
const version = '16.13.2';
|
|
14
14
|
/**
|
|
15
15
|
* An object containing the components of the GraphQL.js version string
|
|
16
16
|
*/
|
|
@@ -19,7 +19,7 @@ exports.version = version;
|
|
|
19
19
|
const versionInfo = Object.freeze({
|
|
20
20
|
major: 16,
|
|
21
21
|
minor: 13,
|
|
22
|
-
patch:
|
|
22
|
+
patch: 2,
|
|
23
23
|
preReleaseTag: null,
|
|
24
24
|
});
|
|
25
25
|
exports.versionInfo = versionInfo;
|
package/version.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* A string containing the version of the GraphQL.js library
|
|
6
6
|
*/
|
|
7
|
-
export const version = '16.13.
|
|
7
|
+
export const version = '16.13.2';
|
|
8
8
|
/**
|
|
9
9
|
* An object containing the components of the GraphQL.js version string
|
|
10
10
|
*/
|
|
@@ -12,6 +12,6 @@ export const version = '16.13.1';
|
|
|
12
12
|
export const versionInfo = Object.freeze({
|
|
13
13
|
major: 16,
|
|
14
14
|
minor: 13,
|
|
15
|
-
patch:
|
|
15
|
+
patch: 2,
|
|
16
16
|
preReleaseTag: null,
|
|
17
17
|
});
|