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 <[email protected]> * 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 <[email protected]> * introduce TypeConflictReporter utility class that will store and print type conflicts when creating graphql schema Signed-off-by: Michal Piechowiak <[email protected]> * enhance findRootNode function to accept predicate function and rename it to findRootNodeAncestor Signed-off-by: Michal Piechowiak <[email protected]> * 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 <[email protected]> * use type conflict reporter when extracting example value Signed-off-by: Michal Piechowiak <[email protected]> * add nested arrays in array of objects to tests Signed-off-by: Michal Piechowiak <[email protected]> * rename nodeDescription to description Signed-off-by: Michal Piechowiak <[email protected]> * add tests for conflict reporting Signed-off-by: Michal Piechowiak <[email protected]> * space out conflict info to be more readable Signed-off-by: Michal Piechowiak <[email protected]> * add description for possible conflicts in page context Signed-off-by: Michal Piechowiak <[email protected]> * fix schema type conflict in gatsbyjs.org Signed-off-by: Michal Piechowiak <[email protected]> * Silence SitePlugin type conflicts Signed-off-by: Michal Piechowiak <[email protected]> * 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 <[email protected]> * rename getExampleValue to getExampleValues Signed-off-by: Michal Piechowiak <[email protected]>
- Loading branch information