-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move federation validations to didBuildSchema hook (#1883)
### 📝 Description We were previously validating usage of `@key`/`@requires`/`@provides` directives when constructing the schema. While it generally worked fine, it is possible to craft a schema when generated types still reference types under construction (see: #1858) and we would have to skip those validations. By moving the validation to the last phase of schema generation, we always have a valid GraphQL schema at that point with resolved references and we can apply validations against all entities at once so we can have single error message with all validations (vs failing the build for each invalid entity). ### 🔗 Related Issues #1858
- Loading branch information
1 parent
716809e
commit ea770ef
Showing
5 changed files
with
43 additions
and
80 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
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
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
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
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