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

Develop a code generator for Mocca clients #23

Open fabiocarvalho777 opened 3 years ago

fabiocarvalho777 commented 3 years ago

Mocca code generator should take as input a GraphQL schema file, and configuration, and produce as output the Mocca client, plus all required POJOs (used in the operation method parameters) and DTOs (used in the operation method return types).

Requirements

  1. Take as input a GraphQL schema file plus optional configuration
  2. Produce as output:
    1. The Mocca client Java interface
    2. All required POJOs (used in the generated client interface operation method parameters)
    3. All required DTOs (used in the generated client interface operation method return types)
  3. The code generator should be written as a Java library (it should not have an entry point)
  4. A second module should be created as a CLI application to execute the code generator
  5. Mocca code generator library should be added as module mocca-codegen
  6. Mocca code generator CLI should be added as module mocca-codegen-cli
  7. A Maven or Gradle plugin might be developed in the future, but they are out of scope for this issue
  8. End user documentation should be updated explaining how to use Mocca code generator