graphql-js
graphql-js copied to clipboard
move name validation in production to separate validation step
Motivation:
- Improve known-valid schema construction time as much as possible.
Background:
- All schema validation except name validation is currently performed separately in the
validateSchema(...), which optimizes schema construction for known-valid schemas. - Name validation is an exception, which provides useful localized dev feedback if a naming mistake has been made, see #4362 and especially this comment which details some history of the code changes.
- This PR adds name validation to the
validateSchema(...)step and makes it so that in a production environment only, name validation is skipped during schema construction.
Depends on:
- #4426
Prior proposals:
- #4423
- #4427