Class GenerateGraphQLSchemaMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.graphql_java_generator.mavenplugin.AbstractCommonMojo
-
- com.graphql_java_generator.mavenplugin.AbstractGenerateGraphQLSchemaMojo
-
- com.graphql_java_generator.mavenplugin.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 AbstractGenerateGraphQLSchemaMojoThe 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classGenerateGraphQLSchemaMojo.SpringConfiguration
-
Field Summary
-
Fields inherited from class com.graphql_java_generator.mavenplugin.AbstractGenerateGraphQLSchemaMojo
projectHelper
-
Fields inherited from class com.graphql_java_generator.mavenplugin.AbstractCommonMojo
buildContext, ctx, enumPrefix, enumSuffix, inputPrefix, inputSuffix, interfacePrefix, interfaceSuffix, maxTokens, springConfigurationClass, typePrefix, typeSuffix, unionPrefix, unionSuffix
-
Fields inherited from interface com.graphql_java_generator.plugin.conf.CommonConfiguration
DEFAULT_ADD_RELAY_CONNECTIONS, DEFAULT_MAX_TOKENS, DEFAULT_PACKAGE_NAME, DEFAULT_PREFIX, DEFAULT_SCHEMA_FILE_FOLDER, DEFAULT_SCHEMA_FILE_PATTERN, DEFAULT_SKIP_GENERATION_IF_SCHEMA_HAS_NOT_CHANGED, DEFAULT_SUFFIX
-
Fields inherited from interface com.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration
DEFAULT_RESOURCE_ENCODING, DEFAULT_TARGET_FOLDER, DEFAULT_TARGET_SCHEMA_FILE_NAME
-
-
Method Summary
-
Methods inherited from class com.graphql_java_generator.mavenplugin.AbstractGenerateGraphQLSchemaMojo
executePostExecutionTask, getResourceEncoding, getSchemaFileFolder, getSchemaFilePattern, getTargetFolder, getTargetSchemaFileName, getTemplates, isAddRelayConnections
-
Methods inherited from class com.graphql_java_generator.mavenplugin.AbstractCommonMojo
execute, getEnumPrefix, getEnumSuffix, getInputPrefix, getInputSuffix, getInterfacePrefix, getInterfaceSuffix, getMaxTokens, getProjectDir, getTypePrefix, getTypeSuffix, getUnionPrefix, getUnionSuffix, isSkipGenerationIfSchemaHasNotChanged
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.graphql_java_generator.plugin.conf.CommonConfiguration
getDefaultTargetSchemaFileName, getEnumPrefix, getEnumSuffix, getInputPrefix, getInputSuffix, getInterfacePrefix, getInterfaceSuffix, getMaxTokens, getProjectDir, getTypePrefix, getTypeSuffix, getUnionPrefix, getUnionSuffix, isGenerateJacksonAnnotations, isSkipGenerationIfSchemaHasNotChanged, logCommonConfiguration
-
Methods inherited from interface com.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration
logConfiguration
-
-