We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12f8330 commit 425fd45Copy full SHA for 425fd45
src/introspection/introspection.ts
@@ -240,9 +240,20 @@ function addParent(schema: SimplifiedIntrospection) {
240
/*
241
* Group fields by their corresponding type id
242
*/
243
- schema.types = R.groupBy(function (field) {
244
- return field.type.id;
245
- }, allFields);
+
+ const mappings = R.map (
246
+ x => R.map(y => y.id, x),
247
+ R.groupBy(function (field) {
248
+ return field.type.id;
249
+ }, allFields)
250
+ );
251
252
+ R.forEach(type => {
253
+ if (mappings[type]) {
254
+ (schema.types[type] as any).parents = mappings[type];
255
+ }
256
+ }, R.keys(schema.types));
257
}
258
259
export function getSchema(schema: GraphQLSchema) {
0 commit comments