More Constraints #23
Comments
I have another use-case: email and URL validation. I think these are pretty common so it would be nice to have a dedicated validators for them (though it is possible to express it via regexp) |
Might be also handled by pre-mutation function calls |
Thoughts:
|
@ejoebstl Massive one up on pre-mutation hooks. Would complete the ability to do any logic you need before mutating something. |
Another common use case:
more inspiration: https://github.com/aldeed/meteor-simple-schema |
Another use case:
|
What about a constrain that specifies that if a type has 3 fields, at least one of them must be non null. For example a
|
Also see: https://github.com/APIs-guru/graphql-constraints-spec, maybe that's relevant for these use cases? |
Closing in favor of #728. |
Make field constraints much more flexible.
This feature can probably be delivered in smaller chunks
Use case 1
A phone number field should match a regex
Use case 2
A phone number field should be required if and only if the roles field is STORE_MANAGER
Use case 3
A money field should only allow prime numbers
The text was updated successfully, but these errors were encountered: