smallrye-graphql icon indicating copy to clipboard operation
smallrye-graphql copied to clipboard

BeanValidation Directives

Open t1 opened this issue 4 years ago • 0 comments

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.

t1 avatar Jun 03 '21 03:06 t1