forked from wundergraph/graphql-go-tools
-
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.
Feature/improve values validation to reflect reference implementation (…
…wundergraph#447) * allow integer to be used in place of ID type * reduce responsibility of valid arguments rule use testify require instead of panic update test to use proper rules move some tests in more proper sections * add position to values * make variable errors messages compatible with reference tests add location to incompatible types error msg add initial values error messages draft * remove skips * partially refactor values validation - fail in exact places when we have more info about fail reason * handle unexpected null error * add more precise enum values error msgs * fix null as a list value fix single item as a list value * skip not existing args in valid arguments validation add a check that default arg value has a non null type * fix arguments validation when variable is placed inside a fragment but defined on operation * add basic known arguments rule * added known arguments names validation rule * store more precise position for types fix variables are input types rule * bring back is satisfies bool flag for flow control * add an error for missing required input object field * use Walker.FieldDefinition everywhere deprecate Walker.FieldDefinitionWithExists add fallback for old planner to fix old planning tests * fix logical err in valueSatisfiesTypeDefinitionNode * fix string for a list test * add locations helper split scalar err messages into separate funcs * add big int value err msg * add BytesIsValidInt32 * add separate scalar types validation with precise error messages * add consts for existing rules names and use them for rules maping * add proper error for unknown input object field add text position to ast object field * add proper error for duplicated fields input object use custom schema for each of test cases for UniqueInputFieldNamesRule test * add variables default values validation add values is not an input object type error * partially fix reporting unknown type for operation * cleanup error messages * chore: fix build * Add failed test cases with boolean args * add variable error helpers reorder helper methods extend validation tests with error messages * check for default values of nested variable usages * chore: fix test * add mapping to reference known arguments rule test * use ast.InvalidRef everywhere in parser * use bytes equal and lexer vars for built-in scalar names * discard changes to legacy planner * add more error text expectations * do not resolve definition unredlying type for variables errors * fix: empty list should be a valid input Co-authored-by: Alasdair Tran <[email protected]>
- Loading branch information
1 parent
97325bf
commit d75b2c0
Showing
25 changed files
with
1,416 additions
and
488 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
Oops, something went wrong.