@wundergraph/composition 0.0.1
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/LICENSE +18 -0
- package/README.md +3 -0
- package/dist/ast/ast.d.ts +84 -0
- package/dist/ast/ast.js +183 -0
- package/dist/ast/ast.js.map +1 -0
- package/dist/ast/utils.d.ts +130 -0
- package/dist/ast/utils.js +298 -0
- package/dist/ast/utils.js.map +1 -0
- package/dist/buildASTSchema/buildASTSchema.d.ts +22 -0
- package/dist/buildASTSchema/buildASTSchema.js +59 -0
- package/dist/buildASTSchema/buildASTSchema.js.map +1 -0
- package/dist/buildASTSchema/extendSchema.d.ts +21 -0
- package/dist/buildASTSchema/extendSchema.js +555 -0
- package/dist/buildASTSchema/extendSchema.js.map +1 -0
- package/dist/errors/errors.d.ts +60 -0
- package/dist/errors/errors.js +302 -0
- package/dist/errors/errors.js.map +1 -0
- package/dist/federation/federation-factory.d.ts +58 -0
- package/dist/federation/federation-factory.js +843 -0
- package/dist/federation/federation-factory.js.map +1 -0
- package/dist/federation/federation-result.d.ts +6 -0
- package/dist/federation/federation-result.js +10 -0
- package/dist/federation/federation-result.js.map +1 -0
- package/dist/federation/subgraph.d.ts +18 -0
- package/dist/federation/subgraph.js +305 -0
- package/dist/federation/subgraph.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/normalization/normalization-factory.d.ts +54 -0
- package/dist/normalization/normalization-factory.js +882 -0
- package/dist/normalization/normalization-factory.js.map +1 -0
- package/dist/normalization/utils.d.ts +121 -0
- package/dist/normalization/utils.js +278 -0
- package/dist/normalization/utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/type-merging/type-merging.d.ts +9 -0
- package/dist/type-merging/type-merging.js +112 -0
- package/dist/type-merging/type-merging.js.map +1 -0
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +157 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/string-constants.d.ts +39 -0
- package/dist/utils/string-constants.js +43 -0
- package/dist/utils/string-constants.js.map +1 -0
- package/dist/utils/utils.d.ts +7 -0
- package/dist/utils/utils.js +80 -0
- package/dist/utils/utils.js.map +1 -0
- package/package.json +35 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extendSchemaImpl = exports.mapValue = exports.AccumulatorMap = void 0;
|
|
4
|
+
const graphql_1 = require("graphql");
|
|
5
|
+
class AccumulatorMap extends Map {
|
|
6
|
+
get [Symbol.toStringTag]() {
|
|
7
|
+
return 'AccumulatorMap';
|
|
8
|
+
}
|
|
9
|
+
add(key, item) {
|
|
10
|
+
const group = this.get(key);
|
|
11
|
+
if (group === undefined) {
|
|
12
|
+
this.set(key, [item]);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
group.push(item);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.AccumulatorMap = AccumulatorMap;
|
|
20
|
+
function mapValue(map, fn) {
|
|
21
|
+
const result = Object.create(null);
|
|
22
|
+
for (const key of Object.keys(map)) {
|
|
23
|
+
result[key] = fn(map[key], key);
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
exports.mapValue = mapValue;
|
|
28
|
+
function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
29
|
+
// Collect the type definitions and extensions found in the document.
|
|
30
|
+
const typeDefs = [];
|
|
31
|
+
const scalarExtensions = new AccumulatorMap();
|
|
32
|
+
const objectExtensions = new AccumulatorMap();
|
|
33
|
+
const interfaceExtensions = new AccumulatorMap();
|
|
34
|
+
const unionExtensions = new AccumulatorMap();
|
|
35
|
+
const enumExtensions = new AccumulatorMap();
|
|
36
|
+
const inputObjectExtensions = new AccumulatorMap();
|
|
37
|
+
// New directives and types are separate because a directives and types can
|
|
38
|
+
// have the same name. For example, a type named "skip".
|
|
39
|
+
const directiveDefs = [];
|
|
40
|
+
let schemaDef;
|
|
41
|
+
// Schema extensions are collected which may add additional operation types.
|
|
42
|
+
const schemaExtensions = [];
|
|
43
|
+
let isSchemaChanged = false;
|
|
44
|
+
for (const def of documentAST.definitions) {
|
|
45
|
+
switch (def.kind) {
|
|
46
|
+
case graphql_1.Kind.SCHEMA_DEFINITION:
|
|
47
|
+
schemaDef = def;
|
|
48
|
+
break;
|
|
49
|
+
case graphql_1.Kind.SCHEMA_EXTENSION:
|
|
50
|
+
schemaExtensions.push(def);
|
|
51
|
+
break;
|
|
52
|
+
case graphql_1.Kind.DIRECTIVE_DEFINITION:
|
|
53
|
+
directiveDefs.push(def);
|
|
54
|
+
break;
|
|
55
|
+
// Type Definitions
|
|
56
|
+
case graphql_1.Kind.SCALAR_TYPE_DEFINITION:
|
|
57
|
+
case graphql_1.Kind.OBJECT_TYPE_DEFINITION:
|
|
58
|
+
case graphql_1.Kind.INTERFACE_TYPE_DEFINITION:
|
|
59
|
+
case graphql_1.Kind.UNION_TYPE_DEFINITION:
|
|
60
|
+
case graphql_1.Kind.ENUM_TYPE_DEFINITION:
|
|
61
|
+
case graphql_1.Kind.INPUT_OBJECT_TYPE_DEFINITION:
|
|
62
|
+
typeDefs.push(def);
|
|
63
|
+
break;
|
|
64
|
+
// Type System Extensions
|
|
65
|
+
case graphql_1.Kind.SCALAR_TYPE_EXTENSION:
|
|
66
|
+
scalarExtensions.add(def.name.value, def);
|
|
67
|
+
break;
|
|
68
|
+
case graphql_1.Kind.OBJECT_TYPE_EXTENSION:
|
|
69
|
+
objectExtensions.add(def.name.value, def);
|
|
70
|
+
break;
|
|
71
|
+
case graphql_1.Kind.INTERFACE_TYPE_EXTENSION:
|
|
72
|
+
interfaceExtensions.add(def.name.value, def);
|
|
73
|
+
break;
|
|
74
|
+
case graphql_1.Kind.UNION_TYPE_EXTENSION:
|
|
75
|
+
unionExtensions.add(def.name.value, def);
|
|
76
|
+
break;
|
|
77
|
+
case graphql_1.Kind.ENUM_TYPE_EXTENSION:
|
|
78
|
+
enumExtensions.add(def.name.value, def);
|
|
79
|
+
break;
|
|
80
|
+
case graphql_1.Kind.INPUT_OBJECT_TYPE_EXTENSION:
|
|
81
|
+
inputObjectExtensions.add(def.name.value, def);
|
|
82
|
+
break;
|
|
83
|
+
default:
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
isSchemaChanged = true;
|
|
87
|
+
}
|
|
88
|
+
// If this document contains no new types, extensions, or directives then
|
|
89
|
+
// return the same unmodified GraphQLSchema instance.
|
|
90
|
+
if (!isSchemaChanged) {
|
|
91
|
+
return schemaConfig;
|
|
92
|
+
}
|
|
93
|
+
const typeMap = new Map();
|
|
94
|
+
for (const type of schemaConfig.types) {
|
|
95
|
+
const graphQLNamedType = extendNamedType(type);
|
|
96
|
+
if (graphQLNamedType) {
|
|
97
|
+
typeMap.set(type.name, graphQLNamedType);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
for (const typeNode of typeDefs) {
|
|
101
|
+
const name = typeNode.name.value;
|
|
102
|
+
typeMap.set(name, stdTypeMap.get(name) ?? buildType(typeNode));
|
|
103
|
+
}
|
|
104
|
+
for (const [name, extensionASTNodes] of objectExtensions) {
|
|
105
|
+
typeMap.set(name, new graphql_1.GraphQLObjectType({
|
|
106
|
+
name,
|
|
107
|
+
interfaces: () => buildInterfaces(extensionASTNodes),
|
|
108
|
+
fields: () => buildFieldMap(extensionASTNodes),
|
|
109
|
+
extensionASTNodes,
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
if (options?.addInvalidExtensionOrphans) {
|
|
113
|
+
for (const [name, extensionASTNodes] of interfaceExtensions) {
|
|
114
|
+
typeMap.set(name, new graphql_1.GraphQLInterfaceType({
|
|
115
|
+
name,
|
|
116
|
+
interfaces: () => buildInterfaces(extensionASTNodes),
|
|
117
|
+
fields: () => buildFieldMap(extensionASTNodes),
|
|
118
|
+
extensionASTNodes,
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
for (const [name, extensionASTNodes] of enumExtensions) {
|
|
122
|
+
typeMap.set(name, new graphql_1.GraphQLEnumType({
|
|
123
|
+
name,
|
|
124
|
+
values: buildEnumValueMap(extensionASTNodes),
|
|
125
|
+
extensionASTNodes,
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
for (const [name, extensionASTNodes] of unionExtensions) {
|
|
129
|
+
typeMap.set(name, new graphql_1.GraphQLUnionType({
|
|
130
|
+
name,
|
|
131
|
+
types: () => buildUnionTypes(extensionASTNodes),
|
|
132
|
+
extensionASTNodes,
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
for (const [name, extensionASTNodes] of scalarExtensions) {
|
|
136
|
+
typeMap.set(name, new graphql_1.GraphQLScalarType({
|
|
137
|
+
name,
|
|
138
|
+
extensionASTNodes,
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
for (const [name, extensionASTNodes] of inputObjectExtensions) {
|
|
142
|
+
typeMap.set(name, new graphql_1.GraphQLInputObjectType({
|
|
143
|
+
name,
|
|
144
|
+
fields: () => buildInputFieldMap(extensionASTNodes),
|
|
145
|
+
extensionASTNodes,
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const operationTypes = {
|
|
150
|
+
// Get the extended root operation types.
|
|
151
|
+
query: schemaConfig.query && replaceNamedType(schemaConfig.query),
|
|
152
|
+
mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),
|
|
153
|
+
subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription),
|
|
154
|
+
// Then, incorporate schema definition and all schema extensions.
|
|
155
|
+
...(schemaDef && getOperationTypes([schemaDef])),
|
|
156
|
+
...getOperationTypes(schemaExtensions),
|
|
157
|
+
};
|
|
158
|
+
// Then produce and return a Schema config with these types.
|
|
159
|
+
return {
|
|
160
|
+
description: schemaDef?.description?.value ?? schemaConfig.description,
|
|
161
|
+
...operationTypes,
|
|
162
|
+
types: Array.from(typeMap.values()),
|
|
163
|
+
directives: [...schemaConfig.directives.map(replaceDirective), ...directiveDefs.map(buildDirective)],
|
|
164
|
+
extensions: schemaConfig.extensions,
|
|
165
|
+
astNode: schemaDef ?? schemaConfig.astNode,
|
|
166
|
+
extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),
|
|
167
|
+
assumeValid: options?.assumeValid ?? false,
|
|
168
|
+
};
|
|
169
|
+
// Below are functions used for producing this schema that have closed over
|
|
170
|
+
// this scope and have access to the schema, cache, and newly defined types.
|
|
171
|
+
function replaceType(type) {
|
|
172
|
+
if ((0, graphql_1.isListType)(type)) {
|
|
173
|
+
// @ts-expect-error
|
|
174
|
+
return new graphql_1.GraphQLList(replaceType(type.ofType));
|
|
175
|
+
}
|
|
176
|
+
if ((0, graphql_1.isNonNullType)(type)) {
|
|
177
|
+
// @ts-expect-error
|
|
178
|
+
return new graphql_1.GraphQLNonNull(replaceType(type.ofType));
|
|
179
|
+
}
|
|
180
|
+
// @ts-expect-error FIXME
|
|
181
|
+
return replaceNamedType(type);
|
|
182
|
+
}
|
|
183
|
+
function replaceNamedType(type) {
|
|
184
|
+
// Note: While this could make early assertions to get the correctly
|
|
185
|
+
// typed values, that would throw immediately while type system
|
|
186
|
+
// validation with validateSchema() will produce more actionable results.
|
|
187
|
+
return typeMap.get(type.name);
|
|
188
|
+
}
|
|
189
|
+
function replaceDirective(directive) {
|
|
190
|
+
if ((0, graphql_1.isSpecifiedDirective)(directive)) {
|
|
191
|
+
// Builtin directives are not extended.
|
|
192
|
+
return directive;
|
|
193
|
+
}
|
|
194
|
+
const config = directive.toConfig();
|
|
195
|
+
return new graphql_1.GraphQLDirective({
|
|
196
|
+
...config,
|
|
197
|
+
args: mapValue(config.args, extendArg),
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
function extendNamedType(type) {
|
|
201
|
+
if ((0, graphql_1.isIntrospectionType)(type) || (0, graphql_1.isSpecifiedScalarType)(type)) {
|
|
202
|
+
// Builtin types are not extended.
|
|
203
|
+
return type;
|
|
204
|
+
}
|
|
205
|
+
if ((0, graphql_1.isScalarType)(type)) {
|
|
206
|
+
return extendScalarType(type);
|
|
207
|
+
}
|
|
208
|
+
if ((0, graphql_1.isObjectType)(type)) {
|
|
209
|
+
return extendObjectType(type);
|
|
210
|
+
}
|
|
211
|
+
if ((0, graphql_1.isInterfaceType)(type)) {
|
|
212
|
+
return extendInterfaceType(type);
|
|
213
|
+
}
|
|
214
|
+
if ((0, graphql_1.isUnionType)(type)) {
|
|
215
|
+
return extendUnionType(type);
|
|
216
|
+
}
|
|
217
|
+
if ((0, graphql_1.isEnumType)(type)) {
|
|
218
|
+
return extendEnumType(type);
|
|
219
|
+
}
|
|
220
|
+
if ((0, graphql_1.isInputObjectType)(type)) {
|
|
221
|
+
return extendInputObjectType(type);
|
|
222
|
+
}
|
|
223
|
+
// Not reachable, all possible type definition nodes have been considered.
|
|
224
|
+
// invariant(false, 'Unexpected type: ' + inspect(type));
|
|
225
|
+
}
|
|
226
|
+
function extendInputObjectType(type) {
|
|
227
|
+
const config = type.toConfig();
|
|
228
|
+
const extensions = inputObjectExtensions.get(config.name) ?? [];
|
|
229
|
+
return new graphql_1.GraphQLInputObjectType({
|
|
230
|
+
...config,
|
|
231
|
+
fields: () => ({
|
|
232
|
+
...mapValue(config.fields, (field) => ({
|
|
233
|
+
...field,
|
|
234
|
+
type: replaceType(field.type),
|
|
235
|
+
})),
|
|
236
|
+
...buildInputFieldMap(extensions),
|
|
237
|
+
}),
|
|
238
|
+
extensionASTNodes: config.extensionASTNodes.concat(extensions),
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function extendEnumType(type) {
|
|
242
|
+
const config = type.toConfig();
|
|
243
|
+
const extensions = enumExtensions.get(type.name) ?? [];
|
|
244
|
+
return new graphql_1.GraphQLEnumType({
|
|
245
|
+
...config,
|
|
246
|
+
values: {
|
|
247
|
+
...config.values,
|
|
248
|
+
...buildEnumValueMap(extensions),
|
|
249
|
+
},
|
|
250
|
+
extensionASTNodes: config.extensionASTNodes.concat(extensions),
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
function extendScalarType(type) {
|
|
254
|
+
const config = type.toConfig();
|
|
255
|
+
const extensions = scalarExtensions.get(config.name) ?? [];
|
|
256
|
+
let specifiedByURL = config.specifiedByURL;
|
|
257
|
+
for (const extensionNode of extensions) {
|
|
258
|
+
specifiedByURL = getSpecifiedByURL(extensionNode) ?? specifiedByURL;
|
|
259
|
+
}
|
|
260
|
+
return new graphql_1.GraphQLScalarType({
|
|
261
|
+
...config,
|
|
262
|
+
specifiedByURL,
|
|
263
|
+
extensionASTNodes: config.extensionASTNodes.concat(extensions),
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
function extendObjectType(type) {
|
|
267
|
+
const config = type.toConfig();
|
|
268
|
+
const extensions = objectExtensions.get(config.name) ?? [];
|
|
269
|
+
return new graphql_1.GraphQLObjectType({
|
|
270
|
+
...config,
|
|
271
|
+
interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
|
|
272
|
+
fields: () => ({
|
|
273
|
+
...mapValue(config.fields, extendField),
|
|
274
|
+
...buildFieldMap(extensions),
|
|
275
|
+
}),
|
|
276
|
+
extensionASTNodes: config.extensionASTNodes.concat(extensions),
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
function extendInterfaceType(type) {
|
|
280
|
+
const config = type.toConfig();
|
|
281
|
+
const extensions = interfaceExtensions.get(config.name) ?? [];
|
|
282
|
+
return new graphql_1.GraphQLInterfaceType({
|
|
283
|
+
...config,
|
|
284
|
+
interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
|
|
285
|
+
fields: () => ({
|
|
286
|
+
...mapValue(config.fields, extendField),
|
|
287
|
+
...buildFieldMap(extensions),
|
|
288
|
+
}),
|
|
289
|
+
extensionASTNodes: config.extensionASTNodes.concat(extensions),
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
function extendUnionType(type) {
|
|
293
|
+
const config = type.toConfig();
|
|
294
|
+
const extensions = unionExtensions.get(config.name) ?? [];
|
|
295
|
+
return new graphql_1.GraphQLUnionType({
|
|
296
|
+
...config,
|
|
297
|
+
types: () => [...type.getTypes().map(replaceNamedType), ...buildUnionTypes(extensions)],
|
|
298
|
+
extensionASTNodes: config.extensionASTNodes.concat(extensions),
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function extendField(field) {
|
|
302
|
+
return {
|
|
303
|
+
...field,
|
|
304
|
+
type: replaceType(field.type),
|
|
305
|
+
args: field.args && mapValue(field.args, extendArg),
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
function extendArg(arg) {
|
|
309
|
+
return {
|
|
310
|
+
...arg,
|
|
311
|
+
type: replaceType(arg.type),
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function getOperationTypes(nodes) {
|
|
315
|
+
const opTypes = {};
|
|
316
|
+
for (const node of nodes) {
|
|
317
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
318
|
+
const operationTypesNodes = /* c8 ignore next */ node.operationTypes ?? [];
|
|
319
|
+
for (const operationType of operationTypesNodes) {
|
|
320
|
+
// Note: While this could make early assertions to get the correctly
|
|
321
|
+
// typed values below, that would throw immediately while type system
|
|
322
|
+
// validation with validateSchema() will produce more actionable results.
|
|
323
|
+
// @ts-expect-error
|
|
324
|
+
opTypes[operationType.operation] = getNamedType(operationType.type);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return opTypes;
|
|
328
|
+
}
|
|
329
|
+
function getNamedType(node) {
|
|
330
|
+
const name = node.name.value;
|
|
331
|
+
const type = stdTypeMap.get(name) ?? typeMap.get(name);
|
|
332
|
+
if (type === undefined) {
|
|
333
|
+
throw new Error(`Unknown type: "${name}".`);
|
|
334
|
+
}
|
|
335
|
+
return type;
|
|
336
|
+
}
|
|
337
|
+
function getWrappedType(node) {
|
|
338
|
+
if (node.kind === graphql_1.Kind.LIST_TYPE) {
|
|
339
|
+
return new graphql_1.GraphQLList(getWrappedType(node.type));
|
|
340
|
+
}
|
|
341
|
+
if (node.kind === graphql_1.Kind.NON_NULL_TYPE) {
|
|
342
|
+
return new graphql_1.GraphQLNonNull(getWrappedType(node.type));
|
|
343
|
+
}
|
|
344
|
+
return getNamedType(node);
|
|
345
|
+
}
|
|
346
|
+
function buildDirective(node) {
|
|
347
|
+
return new graphql_1.GraphQLDirective({
|
|
348
|
+
name: node.name.value,
|
|
349
|
+
description: node.description?.value,
|
|
350
|
+
// @ts-expect-error
|
|
351
|
+
locations: node.locations.map(({ value }) => value),
|
|
352
|
+
isRepeatable: node.repeatable,
|
|
353
|
+
args: buildArgumentMap(node.arguments),
|
|
354
|
+
astNode: node,
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function buildFieldMap(nodes) {
|
|
358
|
+
const fieldConfigMap = Object.create(null);
|
|
359
|
+
for (const node of nodes) {
|
|
360
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
361
|
+
const nodeFields = /* c8 ignore next */ node.fields ?? [];
|
|
362
|
+
for (const field of nodeFields) {
|
|
363
|
+
fieldConfigMap[field.name.value] = {
|
|
364
|
+
// Note: While this could make assertions to get the correctly typed
|
|
365
|
+
// value, that would throw immediately while type system validation
|
|
366
|
+
// with validateSchema() will produce more actionable results.
|
|
367
|
+
type: getWrappedType(field.type),
|
|
368
|
+
description: field.description?.value,
|
|
369
|
+
args: buildArgumentMap(field.arguments),
|
|
370
|
+
deprecationReason: getDeprecationReason(field),
|
|
371
|
+
astNode: field,
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return fieldConfigMap;
|
|
376
|
+
}
|
|
377
|
+
function buildArgumentMap(args) {
|
|
378
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
379
|
+
const argsNodes = /* c8 ignore next */ args ?? [];
|
|
380
|
+
const argConfigMap = Object.create(null);
|
|
381
|
+
for (const arg of argsNodes) {
|
|
382
|
+
// Note: While this could make assertions to get the correctly typed
|
|
383
|
+
// value, that would throw immediately while type system validation
|
|
384
|
+
// with validateSchema() will produce more actionable results.
|
|
385
|
+
const type = getWrappedType(arg.type);
|
|
386
|
+
argConfigMap[arg.name.value] = {
|
|
387
|
+
type,
|
|
388
|
+
description: arg.description?.value,
|
|
389
|
+
defaultValue: (0, graphql_1.valueFromAST)(arg.defaultValue, type),
|
|
390
|
+
deprecationReason: getDeprecationReason(arg),
|
|
391
|
+
astNode: arg,
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
return argConfigMap;
|
|
395
|
+
}
|
|
396
|
+
function buildInputFieldMap(nodes) {
|
|
397
|
+
const inputFieldMap = Object.create(null);
|
|
398
|
+
for (const node of nodes) {
|
|
399
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
400
|
+
const fieldsNodes = /* c8 ignore next */ node.fields ?? [];
|
|
401
|
+
for (const field of fieldsNodes) {
|
|
402
|
+
// Note: While this could make assertions to get the correctly typed
|
|
403
|
+
// value, that would throw immediately while type system validation
|
|
404
|
+
// with validateSchema() will produce more actionable results.
|
|
405
|
+
const type = getWrappedType(field.type);
|
|
406
|
+
inputFieldMap[field.name.value] = {
|
|
407
|
+
type,
|
|
408
|
+
description: field.description?.value,
|
|
409
|
+
defaultValue: (0, graphql_1.valueFromAST)(field.defaultValue, type),
|
|
410
|
+
deprecationReason: getDeprecationReason(field),
|
|
411
|
+
astNode: field,
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return inputFieldMap;
|
|
416
|
+
}
|
|
417
|
+
function buildEnumValueMap(nodes) {
|
|
418
|
+
const enumValueMap = Object.create(null);
|
|
419
|
+
for (const node of nodes) {
|
|
420
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
421
|
+
const valuesNodes = /* c8 ignore next */ node.values ?? [];
|
|
422
|
+
for (const value of valuesNodes) {
|
|
423
|
+
enumValueMap[value.name.value] = {
|
|
424
|
+
description: value.description?.value,
|
|
425
|
+
deprecationReason: getDeprecationReason(value),
|
|
426
|
+
astNode: value,
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return enumValueMap;
|
|
431
|
+
}
|
|
432
|
+
function buildInterfaces(nodes) {
|
|
433
|
+
// Note: While this could make assertions to get the correctly typed
|
|
434
|
+
// values below, that would throw immediately while type system
|
|
435
|
+
// validation with validateSchema() will produce more actionable results.
|
|
436
|
+
// @ts-expect-error
|
|
437
|
+
return nodes.flatMap(
|
|
438
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
439
|
+
(node) => /* c8 ignore next */ node.interfaces?.map(getNamedType) ?? []);
|
|
440
|
+
}
|
|
441
|
+
function buildUnionTypes(nodes) {
|
|
442
|
+
// Note: While this could make assertions to get the correctly typed
|
|
443
|
+
// values below, that would throw immediately while type system
|
|
444
|
+
// validation with validateSchema() will produce more actionable results.
|
|
445
|
+
// @ts-expect-error
|
|
446
|
+
return nodes.flatMap(
|
|
447
|
+
// FIXME: https://github.com/graphql/graphql-js/issues/2203
|
|
448
|
+
(node) => /* c8 ignore next */ node.types?.map(getNamedType) ?? []);
|
|
449
|
+
}
|
|
450
|
+
function buildType(astNode) {
|
|
451
|
+
const name = astNode.name.value;
|
|
452
|
+
switch (astNode.kind) {
|
|
453
|
+
case graphql_1.Kind.OBJECT_TYPE_DEFINITION: {
|
|
454
|
+
const extensionASTNodes = objectExtensions.get(name) ?? [];
|
|
455
|
+
const allNodes = [astNode, ...extensionASTNodes];
|
|
456
|
+
objectExtensions.delete(name);
|
|
457
|
+
return new graphql_1.GraphQLObjectType({
|
|
458
|
+
name,
|
|
459
|
+
description: astNode.description?.value,
|
|
460
|
+
interfaces: () => buildInterfaces(allNodes),
|
|
461
|
+
fields: () => buildFieldMap(allNodes),
|
|
462
|
+
astNode,
|
|
463
|
+
extensionASTNodes,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
case graphql_1.Kind.INTERFACE_TYPE_DEFINITION: {
|
|
467
|
+
const extensionASTNodes = interfaceExtensions.get(name) ?? [];
|
|
468
|
+
const allNodes = [astNode, ...extensionASTNodes];
|
|
469
|
+
interfaceExtensions.delete(name);
|
|
470
|
+
return new graphql_1.GraphQLInterfaceType({
|
|
471
|
+
name,
|
|
472
|
+
description: astNode.description?.value,
|
|
473
|
+
interfaces: () => buildInterfaces(allNodes),
|
|
474
|
+
fields: () => buildFieldMap(allNodes),
|
|
475
|
+
astNode,
|
|
476
|
+
extensionASTNodes,
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
case graphql_1.Kind.ENUM_TYPE_DEFINITION: {
|
|
480
|
+
const extensionASTNodes = enumExtensions.get(name) ?? [];
|
|
481
|
+
const allNodes = [astNode, ...extensionASTNodes];
|
|
482
|
+
enumExtensions.delete(name);
|
|
483
|
+
return new graphql_1.GraphQLEnumType({
|
|
484
|
+
name,
|
|
485
|
+
description: astNode.description?.value,
|
|
486
|
+
values: buildEnumValueMap(allNodes),
|
|
487
|
+
astNode,
|
|
488
|
+
extensionASTNodes,
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
case graphql_1.Kind.UNION_TYPE_DEFINITION: {
|
|
492
|
+
const extensionASTNodes = unionExtensions.get(name) ?? [];
|
|
493
|
+
const allNodes = [astNode, ...extensionASTNodes];
|
|
494
|
+
unionExtensions.delete(name);
|
|
495
|
+
return new graphql_1.GraphQLUnionType({
|
|
496
|
+
name,
|
|
497
|
+
description: astNode.description?.value,
|
|
498
|
+
types: () => buildUnionTypes(allNodes),
|
|
499
|
+
astNode,
|
|
500
|
+
extensionASTNodes,
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
case graphql_1.Kind.SCALAR_TYPE_DEFINITION: {
|
|
504
|
+
const extensionASTNodes = scalarExtensions.get(name) ?? [];
|
|
505
|
+
scalarExtensions.delete(name);
|
|
506
|
+
return new graphql_1.GraphQLScalarType({
|
|
507
|
+
name,
|
|
508
|
+
description: astNode.description?.value,
|
|
509
|
+
specifiedByURL: getSpecifiedByURL(astNode),
|
|
510
|
+
astNode,
|
|
511
|
+
extensionASTNodes,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
case graphql_1.Kind.INPUT_OBJECT_TYPE_DEFINITION: {
|
|
515
|
+
const extensionASTNodes = inputObjectExtensions.get(name) ?? [];
|
|
516
|
+
const allNodes = [astNode, ...extensionASTNodes];
|
|
517
|
+
inputObjectExtensions.delete(name);
|
|
518
|
+
return new graphql_1.GraphQLInputObjectType({
|
|
519
|
+
name,
|
|
520
|
+
description: astNode.description?.value,
|
|
521
|
+
fields: () => buildInputFieldMap(allNodes),
|
|
522
|
+
astNode,
|
|
523
|
+
extensionASTNodes,
|
|
524
|
+
// isOneOf: isOneOf(astNode),
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
exports.extendSchemaImpl = extendSchemaImpl;
|
|
531
|
+
const stdTypeMap = new Map([...graphql_1.specifiedScalarTypes, ...graphql_1.introspectionTypes].map((type) => [type.name, type]));
|
|
532
|
+
/**
|
|
533
|
+
* Given a field or enum value node, returns the string value for the
|
|
534
|
+
* deprecation reason.
|
|
535
|
+
*/
|
|
536
|
+
function getDeprecationReason(node) {
|
|
537
|
+
const deprecated = (0, graphql_1.getDirectiveValues)(graphql_1.GraphQLDeprecatedDirective, node);
|
|
538
|
+
// @ts-expect-error validated by `getDirectiveValues`
|
|
539
|
+
return deprecated?.reason;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Given a scalar node, returns the string value for the specifiedByURL.
|
|
543
|
+
*/
|
|
544
|
+
function getSpecifiedByURL(node) {
|
|
545
|
+
const specifiedBy = (0, graphql_1.getDirectiveValues)(graphql_1.GraphQLSpecifiedByDirective, node);
|
|
546
|
+
// @ts-expect-error validated by `getDirectiveValues`
|
|
547
|
+
return specifiedBy?.url;
|
|
548
|
+
}
|
|
549
|
+
// /**
|
|
550
|
+
// * Given an input object node, returns if the node should be OneOf.
|
|
551
|
+
// */
|
|
552
|
+
// function isOneOf(node: InputObjectTypeDefinitionNode): boolean {
|
|
553
|
+
// return Boolean(getDirectiveValues(GraphQLOneOfDirective, node));
|
|
554
|
+
// }
|
|
555
|
+
//# sourceMappingURL=extendSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extendSchema.js","sourceRoot":"","sources":["../../src/buildASTSchema/extendSchema.ts"],"names":[],"mappings":";;;AAAA,qCA0DiB;AAKjB,MAAa,cAAqB,SAAQ,GAAgB;IACxD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,GAAG,CAAC,GAAM,EAAE,IAAO;QACjB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;SACvB;aAAM;YACL,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAClB;IACH,CAAC;CACF;AAbD,wCAaC;AAED,SAAgB,QAAQ,CAAO,GAAsB,EAAE,EAAgC;IACrF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAEnC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QAClC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;KACjC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAPD,4BAOC;AAcD,SAAgB,gBAAgB,CAC9B,YAA2C,EAC3C,WAAyB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,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAE9G;;;GAGG;AACH,SAAS,oBAAoB,CAC3B,IAA8E;IAE9E,MAAM,UAAU,GAAG,IAAA,4BAAkB,EAAC,oCAA0B,EAAE,IAAI,CAAC,CAAC;IACxE,qDAAqD;IACrD,OAAO,UAAU,EAAE,MAAM,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,IAAwD;IACjF,MAAM,WAAW,GAAG,IAAA,4BAAkB,EAAC,qCAA2B,EAAE,IAAI,CAAC,CAAC;IAC1E,qDAAqD;IACrD,OAAO,WAAW,EAAE,GAAG,CAAC;AAC1B,CAAC;AAED,MAAM;AACN,sEAAsE;AACtE,MAAM;AACN,mEAAmE;AACnE,qEAAqE;AACrE,IAAI"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ObjectContainer, OperationField } from '../ast/utils';
|
|
2
|
+
import { ConstDirectiveNode, Kind, OperationTypeNode, SchemaExtensionNode, TypeExtensionNode } from 'graphql';
|
|
3
|
+
export declare const minimumSubgraphRequirementError: Error;
|
|
4
|
+
export declare function incompatibleArgumentTypesError(argName: string, parentName: string, childName: string, expectedType: string, actualType: string): Error;
|
|
5
|
+
export declare function incompatibleChildTypesError(parentName: string, childName: string, expectedType: string, actualType: string): Error;
|
|
6
|
+
export declare function incompatibleArgumentDefaultValueError(argName: string, parentName: string, childName: string, expectedValue: string | boolean, actualValue: string | boolean): Error;
|
|
7
|
+
export declare function incompatibleArgumentDefaultValueTypeError(argName: string, parentName: string, childName: string, expectedType: Kind, actualType: Kind): Error;
|
|
8
|
+
export declare function incompatibleSharedEnumError(parentName: string): Error;
|
|
9
|
+
export declare function incompatibleExtensionKindsError(node: TypeExtensionNode | SchemaExtensionNode, existingKind: Kind): Error;
|
|
10
|
+
export declare function invalidSubgraphNamesError(names: string[], invalidNameErrorMessages: string[]): Error;
|
|
11
|
+
export declare function duplicateFieldDefinitionError(fieldName: string, typeName: string): Error;
|
|
12
|
+
export declare function duplicateDirectiveDefinitionError(directiveName: string): Error;
|
|
13
|
+
export declare function duplicateEnumValueDefinitionError(valueName: string, typeName: string): Error;
|
|
14
|
+
export declare function duplicateFieldExtensionError(typeName: string, childName: string): Error;
|
|
15
|
+
export declare function duplicateInterfaceError(interfaceName: string, typeName: string): Error;
|
|
16
|
+
export declare function duplicateUnionMemberError(memberName: string, typeName: string): Error;
|
|
17
|
+
export declare function duplicateValueExtensionError(parentType: string, typeName: string, childName: string): Error;
|
|
18
|
+
export declare function duplicateTypeDefinitionError(type: string, typeName: string): Error;
|
|
19
|
+
export declare function duplicateOperationTypeDefinitionError(operationTypeName: OperationTypeNode, newTypeName: string, oldTypeName: string): Error;
|
|
20
|
+
export declare function noBaseTypeExtensionError(typeName: string): Error;
|
|
21
|
+
export declare function noDefinedUnionMembersError(unionName: string): Error;
|
|
22
|
+
export declare function operationDefinitionError(typeName: string, operationType: OperationTypeNode, actualType: Kind): Error;
|
|
23
|
+
export declare function shareableFieldDefinitionsError(parent: ObjectContainer, children: Set<string>): Error;
|
|
24
|
+
export declare function undefinedDirectiveError(directiveName: string, hostPath: string): Error;
|
|
25
|
+
export declare function undefinedEntityKeyErrorMessage(fieldName: string, objectName: string): string;
|
|
26
|
+
export declare function unresolvableFieldError(operationField: OperationField, fieldName: string, unresolvablePaths: string[], fieldSubgraphs: string, parentTypeName: string): Error;
|
|
27
|
+
export declare function undefinedTypeError(typeName: string): Error;
|
|
28
|
+
export declare const federationUnexpectedNodeKindError: (parentName: string, fieldName: string) => Error;
|
|
29
|
+
export declare const federationInvalidParentTypeError: (parentName: string, fieldName: string) => Error;
|
|
30
|
+
export declare const federationRequiredInputFieldError: (parentName: string, fieldName: string) => Error;
|
|
31
|
+
export declare function invalidRepeatedDirectiveErrorMessage(directiveName: string, hostPath: string): string;
|
|
32
|
+
export declare function invalidUnionError(unionName: string): Error;
|
|
33
|
+
export declare function invalidDirectiveError(directiveName: string, hostPath: string, errorMessages: string[]): Error;
|
|
34
|
+
export declare function invalidDirectiveLocationErrorMessage(hostPath: string, kind: Kind, directiveName: string): string;
|
|
35
|
+
export declare function unexpectedDirectiveArgumentsErrorMessage(directive: ConstDirectiveNode, hostPath: string): string;
|
|
36
|
+
export declare function undefinedRequiredArgumentsErrorMessage(directiveName: string, hostPath: string, requiredArguments: string[], missingRequiredArguments?: string[]): string;
|
|
37
|
+
export declare function unexpectedDirectiveArgumentErrorMessage(directiveName: string, argumentName: string): string;
|
|
38
|
+
export declare function duplicateDirectiveArgumentDefinitionErrorMessage(directiveName: string, hostPath: string, argumentName: string): string;
|
|
39
|
+
export declare function invalidKeyDirectiveArgumentErrorMessage(directiveKind: Kind): string;
|
|
40
|
+
export declare function invalidGraphQLNameErrorMessage(type: string, name: string): string;
|
|
41
|
+
export declare const invalidOpeningBraceErrorMessage: string;
|
|
42
|
+
export declare const invalidClosingBraceErrorMessage: string;
|
|
43
|
+
export declare const invalidNestingClosureErrorMessage: string;
|
|
44
|
+
export declare const invalidNestingErrorMessage: string;
|
|
45
|
+
export declare function invalidEntityKeyError(parentTypeName: string, entityKey: string, errorMessage: string): Error;
|
|
46
|
+
export declare function invalidKeyDirectiveError(parentTypeName: string, errorMessages: string[]): Error;
|
|
47
|
+
export declare function undefinedParentFatalError(parentTypeName: string): Error;
|
|
48
|
+
export declare function unexpectedKindFatalError(typeName: string): Error;
|
|
49
|
+
export declare function invalidMultiGraphNodeFatalError(nodeName: string): Error;
|
|
50
|
+
export declare function unexpectedParentKindErrorMessage(parentTypeName: string, expectedKind: Kind, actualKind: Kind): string;
|
|
51
|
+
export declare function incompatibleParentKindFatalError(parentTypeName: string, expectedKind: Kind, actualKind: Kind): Error;
|
|
52
|
+
export declare function unexpectedDirectiveLocationError(locationName: string): Error;
|
|
53
|
+
export declare function unexpectedTypeNodeKindError(childPath: string): Error;
|
|
54
|
+
export declare function objectInCompositeKeyWithoutSelectionsErrorMessage(fieldName: string, fieldTypeName: string): string;
|
|
55
|
+
export declare function subgraphValidationError(subgraphName: string, errors: Error[]): Error;
|
|
56
|
+
export declare const subgraphValidationFailureErrorMessage: Error;
|
|
57
|
+
export declare function invalidSubgraphNameErrorMessage(index: number, newName: string): string;
|
|
58
|
+
export declare function invalidOperationTypeDefinitionError(existingOperationType: OperationTypeNode, typeName: string, newOperationType: OperationTypeNode): Error;
|
|
59
|
+
export declare function invalidRootTypeDefinitionError(operationType: OperationTypeNode, typeName: string, defaultTypeName: string): Error;
|
|
60
|
+
export declare function subgraphInvalidSyntaxError(error: Error): Error;
|