smallrye-graphql
smallrye-graphql copied to clipboard
BeanValidation Directives
Expose the BeanValidation annotations as GraphQL custom directives, e.g.:
class Person {
@Email String email;
}
input Person {
email: String @email
}
As the BeanValidation annotations are not under our control, we could use mixins (#316).
In addition to being documentation for client developers, e.g., a web app may use the directives to render the correct input type and validate it while the user is typing. I don't know if something like this is already being used in existing frontend frameworks.