-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validation for input objects #244
Add validation for input objects #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests fail because there was indeed something illegal 😄
In TestUtils
, CharacterObjectArgs
takes a Character
which contains a Role
which is a union and not a valid input type. You mind fixing it?
Ah also I think it's okay not to test the duplicate names rule since Caliban will only generate something that doesn't break the rule. |
Yeah I thought about that after writing it , I'll remove it |
e1416b5
to
8228607
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a tiny comment and we're good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thank you!
* initial schema validation method layout for interfaces * reformat code * apply review feedback * interface field and argument name validation * refactor & reuse existing validations after merge of #244 * fix valiation rule * add tests * improve error messages * improve error messages: provide context information * refactoring: duplicate code
Closes #231
Not sure how to test the duplicate names rule without building an invalid Input Object by hand.