You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 10, 2019. It is now read-only.
This is more of an suggestion, but I have a custom field that requires arguments and I'd like to use the built-in validation. It only took me a few minutes to realize that a Mutation is nothing more than of Field that has rules applied. I simply switched my Field to extend a Mutation instead and everything works fine, but I'm wondering if that logic could be placed in the Field and still have the Mutation type extend it just for naming purposes.
Alternatively, maybe the logic could be put into a trait which mutations use and the user can choose to add the trait to have validation run on a custom field's arguments (something like ShouldBeValidated).
Thanks!
The text was updated successfully, but these errors were encountered:
This is more of an suggestion, but I have a custom field that requires arguments and I'd like to use the built-in validation. It only took me a few minutes to realize that a Mutation is nothing more than of Field that has rules applied. I simply switched my Field to extend a Mutation instead and everything works fine, but I'm wondering if that logic could be placed in the Field and still have the Mutation type extend it just for naming purposes.
Alternatively, maybe the logic could be put into a trait which mutations use and the user can choose to add the trait to have validation run on a custom field's arguments (something like ShouldBeValidated).
Thanks!
The text was updated successfully, but these errors were encountered: