forked from gatsbyjs/gatsby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log type conflics when inferring graphql types (gatsbyjs#3905)
* add nodeDescription field to node internal object Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * store extracted example value to not run it 4 times for same nodes (for fields, for input fields, for sort field enums and for group enums) Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * introduce TypeConflictReporter utility class that will store and print type conflicts when creating graphql schema Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * enhance findRootNode function to accept predicate function and rename it to findRootNodeAncestor Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * rewrite extractFieldExamples to be able to keep track of selector path and detect type conflicts early (to not merge values if there is conflict) Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * use type conflict reporter when extracting example value Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * add nested arrays in array of objects to tests Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * rename nodeDescription to description Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * add tests for conflict reporting Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * space out conflict info to be more readable Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * add description for possible conflicts in page context Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * fix schema type conflict in gatsbyjs.org Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * Silence SitePlugin type conflicts Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * just in case clear type examples store in data-tree-utils tests - currently examples are not stored because type is not set - this is just future proofing Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * rename getExampleValue to getExampleValues Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
- Loading branch information
1 parent
d37502e
commit 5b1dc1c
Showing
20 changed files
with
551 additions
and
94 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
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
Oops, something went wrong.