Skip to content

Commit 63cec8e

Browse files
committed
Call healSchema in visitSchemaDirectives rather than in visitSchema.
It should be possible to visit a schema without going to the trouble of healing it as well.
1 parent 31b8fb2 commit 63cec8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/schemaVisitor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,6 @@ export function visitSchema(
280280

281281
visit(schema);
282282

283-
// Automatically update any references to named schema types replaced during
284-
// the traversal, so implementors don't have to worry about that.
285-
healSchema(schema);
286-
287283
// Return the original schema for convenience, even though it cannot have
288284
// been replaced or removed by the code above.
289285
return schema;
@@ -601,6 +597,10 @@ export class SchemaDirectiveVisitor extends SchemaVisitor {
601597

602598
visitSchema(schema, visitorSelector);
603599

600+
// Automatically update any references to named schema types replaced
601+
// during the traversal, so implementors don't have to worry about that.
602+
healSchema(schema);
603+
604604
return createdVisitors;
605605
}
606606

0 commit comments

Comments
 (0)