@graphitation/supermassive 2.2.2 → 2.3.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/.eslintcache +1 -1
- package/CHANGELOG.md +9 -1
- package/lib/ast/TypedAST.js +1 -0
- package/lib/ast/addTypesToRequestDocument.js +48 -42
- package/lib/ast/addTypesToRequestDocument.mjs +47 -42
- package/lib/benchmarks/index.js +15 -4
- package/lib/benchmarks/index.mjs +6 -3
- package/lib/benchmarks/nice-benchmark.js +1 -0
- package/lib/benchmarks/swapi-schema/index.js +14 -4
- package/lib/benchmarks/swapi-schema/index.mjs +5 -3
- package/lib/benchmarks/swapi-schema/models.js +9 -1
- package/lib/benchmarks/swapi-schema/resolvers.js +22 -7
- package/lib/benchmarks/swapi-schema/resolvers.mjs +21 -7
- package/lib/collectFields.js +41 -11
- package/lib/collectFields.mjs +40 -11
- package/lib/compiledQuery.js +1 -0
- package/lib/definition.js +13 -8
- package/lib/definition.mjs +12 -8
- package/lib/directives.js +48 -33
- package/lib/directives.mjs +47 -33
- package/lib/executeWithSchema.d.ts +1 -1
- package/lib/executeWithSchema.d.ts.map +1 -1
- package/lib/executeWithSchema.js +5 -2
- package/lib/executeWithSchema.mjs +4 -2
- package/lib/executeWithoutSchema.d.ts +3 -1
- package/lib/executeWithoutSchema.d.ts.map +1 -1
- package/lib/executeWithoutSchema.js +365 -55
- package/lib/executeWithoutSchema.mjs +358 -52
- package/lib/extractImplicitTypesRuntime.js +4 -1
- package/lib/extractImplicitTypesRuntime.mjs +3 -1
- package/lib/hooks/types.d.ts +33 -0
- package/lib/hooks/types.d.ts.map +1 -0
- package/lib/hooks/types.js +16 -0
- package/lib/hooks/types.mjs +0 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -0
- package/lib/index.mjs +16 -0
- package/lib/jsutils/Maybe.js +1 -0
- package/lib/jsutils/ObjMap.js +1 -0
- package/lib/jsutils/Path.js +1 -0
- package/lib/jsutils/PromiseOrValue.js +1 -0
- package/lib/jsutils/devAssert.js +1 -0
- package/lib/jsutils/didYouMean.js +1 -0
- package/lib/jsutils/identityFunc.js +1 -0
- package/lib/jsutils/inspect.js +4 -1
- package/lib/jsutils/inspect.mjs +3 -1
- package/lib/jsutils/instanceOf.js +18 -6
- package/lib/jsutils/instanceOf.mjs +17 -6
- package/lib/jsutils/invariant.js +4 -1
- package/lib/jsutils/invariant.mjs +3 -1
- package/lib/jsutils/isAsyncIterable.js +1 -0
- package/lib/jsutils/isIterableObject.js +1 -0
- package/lib/jsutils/isObjectLike.js +1 -0
- package/lib/jsutils/isPromise.js +1 -0
- package/lib/jsutils/keyMap.js +1 -0
- package/lib/jsutils/keyValMap.js +1 -0
- package/lib/jsutils/mapValue.js +1 -0
- package/lib/jsutils/memoize3.js +1 -0
- package/lib/jsutils/naturalCompare.js +1 -0
- package/lib/jsutils/printPathArray.js +4 -1
- package/lib/jsutils/printPathArray.mjs +3 -1
- package/lib/jsutils/promiseForObject.js +1 -0
- package/lib/jsutils/promiseReduce.js +1 -0
- package/lib/jsutils/suggestionList.js +9 -1
- package/lib/jsutils/suggestionList.mjs +8 -1
- package/lib/jsutils/toObjMap.js +1 -0
- package/lib/subscribeWithSchema.js +1 -0
- package/lib/subscribeWithoutSchema.js +45 -6
- package/lib/subscribeWithoutSchema.mjs +44 -6
- package/lib/transforms/annotateDocumentGraphQLTransform.js +1 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -0
- package/lib/utilities/array.d.ts +2 -0
- package/lib/utilities/array.d.ts.map +1 -0
- package/lib/utilities/array.js +34 -0
- package/lib/utilities/array.mjs +15 -0
- package/lib/utilities/blankGraphQLTag.js +1 -0
- package/lib/utilities/mapAsyncIterator.js +1 -0
- package/lib/utilities/mergeResolvers.js +1 -0
- package/lib/utilities/typeNameFromAST.js +1 -0
- package/lib/values.js +82 -21
- package/lib/values.mjs +81 -21
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var array_exports = {};
|
|
20
|
+
__export(array_exports, {
|
|
21
|
+
arraysAreEqual: () => arraysAreEqual
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(array_exports);
|
|
24
|
+
function arraysAreEqual(array1, array2) {
|
|
25
|
+
if (array1.length !== array2.length) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
for (let i = 0; i < array1.length - 1; i++) {
|
|
29
|
+
if (array1[i] !== array2[i]) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/utilities/array.ts
|
|
2
|
+
function arraysAreEqual(array1, array2) {
|
|
3
|
+
if (array1.length !== array2.length) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
for (let i = 0; i < array1.length - 1; i++) {
|
|
7
|
+
if (array1[i] !== array2[i]) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
arraysAreEqual
|
|
15
|
+
};
|
package/lib/values.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -31,12 +32,19 @@ function getVariableValues(resolvers, varDefNodes, inputs, options) {
|
|
|
31
32
|
const errors = [];
|
|
32
33
|
const maxErrors = options == null ? void 0 : options.maxErrors;
|
|
33
34
|
try {
|
|
34
|
-
const coerced = coerceVariableValues(
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const coerced = coerceVariableValues(
|
|
36
|
+
resolvers,
|
|
37
|
+
varDefNodes,
|
|
38
|
+
inputs,
|
|
39
|
+
(error) => {
|
|
40
|
+
if (maxErrors != null && errors.length >= maxErrors) {
|
|
41
|
+
throw new import_graphql.GraphQLError(
|
|
42
|
+
"Too many errors processing variables, error limit reached. Execution aborted."
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
errors.push(error);
|
|
37
46
|
}
|
|
38
|
-
|
|
39
|
-
});
|
|
47
|
+
);
|
|
40
48
|
if (errors.length === 0) {
|
|
41
49
|
return { coerced };
|
|
42
50
|
}
|
|
@@ -53,31 +61,62 @@ function coerceVariableValues(resolvers, varDefNodes, inputs, onError) {
|
|
|
53
61
|
const varType = graphqlTypeFromTypeAst(resolvers, varTypeAst);
|
|
54
62
|
if (!(0, import_graphql.isInputType)(varType)) {
|
|
55
63
|
const varTypeStr = (0, import_inspect.inspect)(varType);
|
|
56
|
-
onError(
|
|
64
|
+
onError(
|
|
65
|
+
new import_graphql.GraphQLError(
|
|
66
|
+
`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`,
|
|
67
|
+
varDefNode.type
|
|
68
|
+
)
|
|
69
|
+
);
|
|
57
70
|
continue;
|
|
58
71
|
}
|
|
59
72
|
if (!hasOwnProperty(inputs, varName)) {
|
|
60
73
|
if (varDefNode.defaultValue) {
|
|
61
|
-
coercedValues[varName] = (0, import_graphql.valueFromAST)(
|
|
74
|
+
coercedValues[varName] = (0, import_graphql.valueFromAST)(
|
|
75
|
+
varDefNode.defaultValue,
|
|
76
|
+
varType
|
|
77
|
+
);
|
|
62
78
|
} else if ((0, import_graphql.isNonNullType)(varType)) {
|
|
63
79
|
const varTypeStr = (0, import_graphql.print)(varDefNode.type);
|
|
64
|
-
onError(
|
|
80
|
+
onError(
|
|
81
|
+
new import_graphql.GraphQLError(
|
|
82
|
+
`Variable "$${varName}" of required type "${varTypeStr}" was not provided.`,
|
|
83
|
+
varDefNode
|
|
84
|
+
)
|
|
85
|
+
);
|
|
65
86
|
}
|
|
66
87
|
continue;
|
|
67
88
|
}
|
|
68
89
|
const value = inputs[varName];
|
|
69
90
|
if (value === null && (0, import_graphql.isNonNullType)(varType)) {
|
|
70
91
|
const varTypeStr = (0, import_inspect.inspect)(varType);
|
|
71
|
-
onError(
|
|
92
|
+
onError(
|
|
93
|
+
new import_graphql.GraphQLError(
|
|
94
|
+
`Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`,
|
|
95
|
+
varDefNode
|
|
96
|
+
)
|
|
97
|
+
);
|
|
72
98
|
continue;
|
|
73
99
|
}
|
|
74
|
-
coercedValues[varName] = (0, import_graphql.coerceInputValue)(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
100
|
+
coercedValues[varName] = (0, import_graphql.coerceInputValue)(
|
|
101
|
+
value,
|
|
102
|
+
varType,
|
|
103
|
+
(path, invalidValue, error) => {
|
|
104
|
+
let prefix = `Variable "$${varName}" got invalid value ` + (0, import_inspect.inspect)(invalidValue);
|
|
105
|
+
if (path.length > 0) {
|
|
106
|
+
prefix += ` at "${varName}${(0, import_printPathArray.printPathArray)(path)}"`;
|
|
107
|
+
}
|
|
108
|
+
onError(
|
|
109
|
+
new import_graphql.GraphQLError(
|
|
110
|
+
prefix + "; " + error.message,
|
|
111
|
+
varDefNode,
|
|
112
|
+
void 0,
|
|
113
|
+
void 0,
|
|
114
|
+
void 0,
|
|
115
|
+
error.originalError
|
|
116
|
+
)
|
|
117
|
+
);
|
|
78
118
|
}
|
|
79
|
-
|
|
80
|
-
});
|
|
119
|
+
);
|
|
81
120
|
}
|
|
82
121
|
return coercedValues;
|
|
83
122
|
}
|
|
@@ -85,14 +124,22 @@ function getArgumentValues(resolvers, node, variableValues) {
|
|
|
85
124
|
var _a;
|
|
86
125
|
const coercedValues = {};
|
|
87
126
|
const argumentNodes = (_a = node.arguments) != null ? _a : [];
|
|
88
|
-
const argNodeMap = (0, import_keyMap.keyMap)(
|
|
127
|
+
const argNodeMap = (0, import_keyMap.keyMap)(
|
|
128
|
+
argumentNodes,
|
|
129
|
+
(arg) => arg.name.value
|
|
130
|
+
);
|
|
89
131
|
for (const argumentNode of argumentNodes) {
|
|
90
132
|
const name = argumentNode.name.value;
|
|
91
133
|
const argTypeNode = argumentNode.__type;
|
|
92
134
|
const argType = graphqlTypeFromTypeAst(resolvers, argTypeNode);
|
|
93
135
|
if (!(0, import_graphql.isInputType)(argType)) {
|
|
94
136
|
console.log(argType, (0, import_graphql.isInputType)(argType));
|
|
95
|
-
throw new import_graphql.GraphQLError(
|
|
137
|
+
throw new import_graphql.GraphQLError(
|
|
138
|
+
`Argument "$${name}" expected value of type "${(0, import_inspect.inspect)(
|
|
139
|
+
argType
|
|
140
|
+
)}" which cannot be used as an input type.`,
|
|
141
|
+
argumentNode
|
|
142
|
+
);
|
|
96
143
|
}
|
|
97
144
|
let valueNode = argumentNode.value;
|
|
98
145
|
let isNull = valueNode.kind === import_graphql.Kind.NULL;
|
|
@@ -102,15 +149,27 @@ function getArgumentValues(resolvers, node, variableValues) {
|
|
|
102
149
|
if (argumentNode.__defaultValue != void 0) {
|
|
103
150
|
valueNode = argumentNode.__defaultValue;
|
|
104
151
|
} else if ((0, import_graphql.isNonNullType)(argType)) {
|
|
105
|
-
throw new import_graphql.GraphQLError(
|
|
152
|
+
throw new import_graphql.GraphQLError(
|
|
153
|
+
`Argument "${name}" of required type "${(0, import_inspect.inspect)(argType)}" was provided the variable "$${variableName}" which was not provided a runtime value.`,
|
|
154
|
+
valueNode
|
|
155
|
+
);
|
|
106
156
|
}
|
|
107
157
|
continue;
|
|
108
158
|
}
|
|
109
159
|
isNull = !variableValues || variableValues[variableName] == null;
|
|
110
160
|
}
|
|
111
|
-
const coercedValue = (0, import_graphql.valueFromAST)(
|
|
161
|
+
const coercedValue = (0, import_graphql.valueFromAST)(
|
|
162
|
+
valueNode,
|
|
163
|
+
argType,
|
|
164
|
+
variableValues
|
|
165
|
+
);
|
|
112
166
|
if (coercedValue === void 0) {
|
|
113
|
-
throw new import_graphql.GraphQLError(
|
|
167
|
+
throw new import_graphql.GraphQLError(
|
|
168
|
+
`Argument "${name}" has invalid value ${(0, import_graphql.print)(
|
|
169
|
+
valueNode
|
|
170
|
+
)}.`,
|
|
171
|
+
valueNode
|
|
172
|
+
);
|
|
114
173
|
}
|
|
115
174
|
coercedValues[name] = coercedValue;
|
|
116
175
|
}
|
|
@@ -118,7 +177,9 @@ function getArgumentValues(resolvers, node, variableValues) {
|
|
|
118
177
|
}
|
|
119
178
|
function getDirectiveValues(directiveDef, node, resolvers, variableValues) {
|
|
120
179
|
var _a;
|
|
121
|
-
const directiveNode = (_a = node.directives) == null ? void 0 : _a.find(
|
|
180
|
+
const directiveNode = (_a = node.directives) == null ? void 0 : _a.find(
|
|
181
|
+
(directive) => directive.name.value === directiveDef.name
|
|
182
|
+
);
|
|
122
183
|
if (directiveNode) {
|
|
123
184
|
return getArgumentValues(resolvers, directiveNode, variableValues);
|
|
124
185
|
}
|
package/lib/values.mjs
CHANGED
|
@@ -22,12 +22,19 @@ function getVariableValues(resolvers, varDefNodes, inputs, options) {
|
|
|
22
22
|
const errors = [];
|
|
23
23
|
const maxErrors = options == null ? void 0 : options.maxErrors;
|
|
24
24
|
try {
|
|
25
|
-
const coerced = coerceVariableValues(
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const coerced = coerceVariableValues(
|
|
26
|
+
resolvers,
|
|
27
|
+
varDefNodes,
|
|
28
|
+
inputs,
|
|
29
|
+
(error) => {
|
|
30
|
+
if (maxErrors != null && errors.length >= maxErrors) {
|
|
31
|
+
throw new GraphQLError(
|
|
32
|
+
"Too many errors processing variables, error limit reached. Execution aborted."
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
errors.push(error);
|
|
28
36
|
}
|
|
29
|
-
|
|
30
|
-
});
|
|
37
|
+
);
|
|
31
38
|
if (errors.length === 0) {
|
|
32
39
|
return { coerced };
|
|
33
40
|
}
|
|
@@ -44,31 +51,62 @@ function coerceVariableValues(resolvers, varDefNodes, inputs, onError) {
|
|
|
44
51
|
const varType = graphqlTypeFromTypeAst(resolvers, varTypeAst);
|
|
45
52
|
if (!isInputType(varType)) {
|
|
46
53
|
const varTypeStr = inspect(varType);
|
|
47
|
-
onError(
|
|
54
|
+
onError(
|
|
55
|
+
new GraphQLError(
|
|
56
|
+
`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`,
|
|
57
|
+
varDefNode.type
|
|
58
|
+
)
|
|
59
|
+
);
|
|
48
60
|
continue;
|
|
49
61
|
}
|
|
50
62
|
if (!hasOwnProperty(inputs, varName)) {
|
|
51
63
|
if (varDefNode.defaultValue) {
|
|
52
|
-
coercedValues[varName] = valueFromAST(
|
|
64
|
+
coercedValues[varName] = valueFromAST(
|
|
65
|
+
varDefNode.defaultValue,
|
|
66
|
+
varType
|
|
67
|
+
);
|
|
53
68
|
} else if (isNonNullType(varType)) {
|
|
54
69
|
const varTypeStr = print(varDefNode.type);
|
|
55
|
-
onError(
|
|
70
|
+
onError(
|
|
71
|
+
new GraphQLError(
|
|
72
|
+
`Variable "$${varName}" of required type "${varTypeStr}" was not provided.`,
|
|
73
|
+
varDefNode
|
|
74
|
+
)
|
|
75
|
+
);
|
|
56
76
|
}
|
|
57
77
|
continue;
|
|
58
78
|
}
|
|
59
79
|
const value = inputs[varName];
|
|
60
80
|
if (value === null && isNonNullType(varType)) {
|
|
61
81
|
const varTypeStr = inspect(varType);
|
|
62
|
-
onError(
|
|
82
|
+
onError(
|
|
83
|
+
new GraphQLError(
|
|
84
|
+
`Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`,
|
|
85
|
+
varDefNode
|
|
86
|
+
)
|
|
87
|
+
);
|
|
63
88
|
continue;
|
|
64
89
|
}
|
|
65
|
-
coercedValues[varName] = coerceInputValue(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
90
|
+
coercedValues[varName] = coerceInputValue(
|
|
91
|
+
value,
|
|
92
|
+
varType,
|
|
93
|
+
(path, invalidValue, error) => {
|
|
94
|
+
let prefix = `Variable "$${varName}" got invalid value ` + inspect(invalidValue);
|
|
95
|
+
if (path.length > 0) {
|
|
96
|
+
prefix += ` at "${varName}${printPathArray(path)}"`;
|
|
97
|
+
}
|
|
98
|
+
onError(
|
|
99
|
+
new GraphQLError(
|
|
100
|
+
prefix + "; " + error.message,
|
|
101
|
+
varDefNode,
|
|
102
|
+
void 0,
|
|
103
|
+
void 0,
|
|
104
|
+
void 0,
|
|
105
|
+
error.originalError
|
|
106
|
+
)
|
|
107
|
+
);
|
|
69
108
|
}
|
|
70
|
-
|
|
71
|
-
});
|
|
109
|
+
);
|
|
72
110
|
}
|
|
73
111
|
return coercedValues;
|
|
74
112
|
}
|
|
@@ -76,14 +114,22 @@ function getArgumentValues(resolvers, node, variableValues) {
|
|
|
76
114
|
var _a;
|
|
77
115
|
const coercedValues = {};
|
|
78
116
|
const argumentNodes = (_a = node.arguments) != null ? _a : [];
|
|
79
|
-
const argNodeMap = keyMap(
|
|
117
|
+
const argNodeMap = keyMap(
|
|
118
|
+
argumentNodes,
|
|
119
|
+
(arg) => arg.name.value
|
|
120
|
+
);
|
|
80
121
|
for (const argumentNode of argumentNodes) {
|
|
81
122
|
const name = argumentNode.name.value;
|
|
82
123
|
const argTypeNode = argumentNode.__type;
|
|
83
124
|
const argType = graphqlTypeFromTypeAst(resolvers, argTypeNode);
|
|
84
125
|
if (!isInputType(argType)) {
|
|
85
126
|
console.log(argType, isInputType(argType));
|
|
86
|
-
throw new GraphQLError(
|
|
127
|
+
throw new GraphQLError(
|
|
128
|
+
`Argument "$${name}" expected value of type "${inspect(
|
|
129
|
+
argType
|
|
130
|
+
)}" which cannot be used as an input type.`,
|
|
131
|
+
argumentNode
|
|
132
|
+
);
|
|
87
133
|
}
|
|
88
134
|
let valueNode = argumentNode.value;
|
|
89
135
|
let isNull = valueNode.kind === Kind.NULL;
|
|
@@ -93,15 +139,27 @@ function getArgumentValues(resolvers, node, variableValues) {
|
|
|
93
139
|
if (argumentNode.__defaultValue != void 0) {
|
|
94
140
|
valueNode = argumentNode.__defaultValue;
|
|
95
141
|
} else if (isNonNullType(argType)) {
|
|
96
|
-
throw new GraphQLError(
|
|
142
|
+
throw new GraphQLError(
|
|
143
|
+
`Argument "${name}" of required type "${inspect(argType)}" was provided the variable "$${variableName}" which was not provided a runtime value.`,
|
|
144
|
+
valueNode
|
|
145
|
+
);
|
|
97
146
|
}
|
|
98
147
|
continue;
|
|
99
148
|
}
|
|
100
149
|
isNull = !variableValues || variableValues[variableName] == null;
|
|
101
150
|
}
|
|
102
|
-
const coercedValue = valueFromAST(
|
|
151
|
+
const coercedValue = valueFromAST(
|
|
152
|
+
valueNode,
|
|
153
|
+
argType,
|
|
154
|
+
variableValues
|
|
155
|
+
);
|
|
103
156
|
if (coercedValue === void 0) {
|
|
104
|
-
throw new GraphQLError(
|
|
157
|
+
throw new GraphQLError(
|
|
158
|
+
`Argument "${name}" has invalid value ${print(
|
|
159
|
+
valueNode
|
|
160
|
+
)}.`,
|
|
161
|
+
valueNode
|
|
162
|
+
);
|
|
105
163
|
}
|
|
106
164
|
coercedValues[name] = coercedValue;
|
|
107
165
|
}
|
|
@@ -109,7 +167,9 @@ function getArgumentValues(resolvers, node, variableValues) {
|
|
|
109
167
|
}
|
|
110
168
|
function getDirectiveValues(directiveDef, node, resolvers, variableValues) {
|
|
111
169
|
var _a;
|
|
112
|
-
const directiveNode = (_a = node.directives) == null ? void 0 : _a.find(
|
|
170
|
+
const directiveNode = (_a = node.directives) == null ? void 0 : _a.find(
|
|
171
|
+
(directive) => directive.name.value === directiveDef.name
|
|
172
|
+
);
|
|
113
173
|
if (directiveNode) {
|
|
114
174
|
return getArgumentValues(resolvers, directiveNode, variableValues);
|
|
115
175
|
}
|