-
-
Notifications
You must be signed in to change notification settings - Fork 816
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent visitSchema from replacing the original GraphQLSchema object.
Implementing the visitSchema method can be a good idea if you want to modify the existing GraphQLSchema object, but replacing the entire schema is pointless, because you're basically disregarding the result of makeExecutableSchema. Also, SchemaDirectiveVisitor.visitSchemaDirectives relies on the schema object remaining the same throughout the traversal, and it would be tricky to update the schema (as seen by visitSchemaDirectives) mid-traversal.
- Loading branch information
Showing
1 changed file
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters