paypal / mocca

Mocca is a GraphQL client for JVM languages with the goal of being easy to use, flexible and modular.
MIT License
15 stars 14 forks source link

Add support for Bean Validations annotations to validate GraphQL operation method parameters #28

Closed fabiocarvalho777 closed 2 years ago

fabiocarvalho777 commented 3 years ago

Mocca should support Bean Validations annotations to validate GraphQL operation method parameters.

Hibernate has an implementation of it, but there might be others. As part of this issue, research existent Bean Validations implementations and choose the best one for Mocca.

The user experience should be as follows:

  1. Add Bean Validation implementation dependency to application
  2. Add Bean Validation annotations to Var annotated parameters (in a GraphQL operation method)
  3. No specific client builder configuration is necessary

Acceptance Criteria

  1. Use case described above is implemented
  2. End user document is changed accordingly
  3. Javadocs are changed accordingly
  4. Unit and/or functional tests are added
  5. Make sure to add negative tests as well