Class GenerateGraphQLSchemaMojo

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

    @Mojo(name="generateGraphQLSchema",
          defaultPhase=INITIALIZE,
          requiresProject=true)
    @ThreadSafe
    public class GenerateGraphQLSchemaMojo
    extends AbstractGenerateGraphQLSchemaMojo

    The generateGraphQLSchema goal generates GraphQL schema, based on the source GraphQL schemas, and possibly containing additional stuff, like the Relay connection objects.

    It can be used to:
    • Generate several GraphQL schema files into one file, for instance with additional schema files that would use the extend GraphQL keyword
    • Reformat the schema file
    • Generate the GraphQL schema with the Relay Connection stuff (Node interface, XxxEdge and XxxConnection types), thanks to the addRelayConnections plugin parameter.

    This goal is, by default, attached to the Initialize maven phase, to be sure that the GraphQL schema are generated before the code generation would need it, if relevant.

    Author:
    etienne-sf