From 31b8fb2f7e8549f3e6149796cf06acf464b5f0b1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 10 Mar 2018 10:30:31 -0500 Subject: [PATCH] Fix bug in healSchema that sometimes removed '__'-prefixed types. --- src/schemaVisitor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/schemaVisitor.ts b/src/schemaVisitor.ts index 47018dea454..b94338d257e 100644 --- a/src/schemaVisitor.ts +++ b/src/schemaVisitor.ts @@ -353,7 +353,8 @@ export function healSchema(schema: GraphQLSchema) { // Dangling references to renamed types should remain in the schema // during healing, but must be removed now, so that the following // invariant holds for all names: schema.getType(name).name === name - if (! hasOwn.call(actualNamedTypeMap, typeName)) { + if (! typeName.startsWith('__') && + ! hasOwn.call(actualNamedTypeMap, typeName)) { return null; } });