Skip to content

Commit

Permalink
Fix bug in healSchema that sometimes removed '__'-prefixed types.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Mar 14, 2018
1 parent 0dd82be commit 31b8fb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/schemaVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
Expand Down

0 comments on commit 31b8fb2

Please sign in to comment.