Class GenerateClientCodeMojo

  • All Implemented Interfaces:
    CommonConfiguration, GenerateClientCodeConfiguration, GenerateCodeCommonConfiguration, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="generateClientCode",
          defaultPhase=GENERATE_SOURCES,
          requiresProject=true)
    @ThreadSafe
    public class GenerateClientCodeMojo
    extends AbstractGenerateClientCodeMojo

    The generateClientCode Maven goal (and Gradle task) generates the java code from one or more GraphQL schemas. It allows to work in Java with graphQL, in a schema first approach.

    It generates a class for each query, mutation and subscription type. These classes contain the methods to call the queries, mutations and subscriptions. That is: to execute a query against the GraphQL server, you just have to call one of these methods. It also generates the POJOs from the GraphQL schema. The GraphQL response is stored in these POJOs, for an easy and standard use in Java.

    You'll find more info in the tutorials: take a look at the Maven client tutorial or the Gradle client tutorial
    Author:
    etienne-sf
    • Constructor Detail

      • GenerateClientCodeMojo

        protected GenerateClientCodeMojo()