Class GenerateGraphQLSchemaTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.graphql_java_generator.gradleplugin.CommonTask
com.graphql_java_generator.gradleplugin.GenerateGraphQLSchemaTask
All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration, com.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration, java.lang.Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

public class GenerateGraphQLSchemaTask
extends CommonTask
implements com.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration

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.

Note: The attribute have no default values: their default values is read from the GenerateCodeCommonExtension, whose attributes can be either the default value, or a value set in the build script.