Full name:
com.graphql-java-generator:graphql-maven-plugin:1.18.7:generateGraphQLSchema
Description:
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: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.
Attributes:
initialize
.Name | Type | Since | Description |
---|---|---|---|
<addRelayConnections> |
boolean |
- |
True if the plugin is configured to add the Relay connection capabilities to the field marked by the @RelayConnection directive. If so, the plugin reads the provided GraphQL schema file(s), and enriches them with the interfaces and types needed to respect the Relay Connection specification. The entry point for that is the @RelayConnection directive. You'll find all the information on the plugin web site. Please check the server Relay capability page. Default value is: false .User property is: com.graphql_java_generator.mavenplugin.addRelayConnections . |
<maxTokens> |
Integer |
- |
(Useless, since 1.18.7)Defines the options that maximum
number of tokens that the GraphQL schema parser may read. The
default value is Integer.MAX_VALUE (=2147483647). If the schema
contains more than maxTokens, the build will fail with an
error. Default value is: 2147483647 .User property is: com.graphql_java_generator.mavenplugin.maxTokens . |
<resourceEncoding> |
String |
- |
The encoding for the generated resource files Default value is: UTF-8 .User property is: com.graphql_java_generator.mavenplugin.resourceEncoding . |
<schemaFileFolder> |
File |
- |
The folder where the graphql schema file(s) will be searched. The
default schema is the main resource folder. Default value is: src/main/resources .User property is: com.graphql_java_generator.mavenplugin.schemaFileFolder . |
<schemaFilePattern> |
String |
- |
The pattern to find the graphql schema file(s). The default value is "/*.graphqls" meaning that the maven plugin will search all graphqls files in the "/src/main/resources" folder (please check also the schemaFileFolder plugin parameter). You can put the star (*) joker in the filename, to retrieve several files at ones, for instance /myschema*.graphqls will retrieve the /src/main/resources/myschema.graphqls and /src/main/resources/myschema_extend.graphqls files. Default value is: *.graphqls .User property is: com.graphql_java_generator.mavenplugin.schemaFilePattern . |
<skipGenerationIfSchemaHasNotChanged> |
boolean |
- |
This parameter is now deprecated: it's value used in the plugin is always true, that is: if the generated sources or resources are older than the GraphQL schema file(s), then there is no source or resource generation. In clear, the source and resource generation is executed only if the provided input (GraphQL schema...) has been updated since the last plugin execution. Default value is: true .User property is: com.graphql_java_generator.mavenplugin.skipGenerationIfSchemaHasNotChanged . |
<targetFolder> |
File |
- |
The folder where the generated GraphQL schema will be stored Default value is: /generated-resources/graphql-maven-plugin_generate-relay-schema .User property is: com.graphql_java_generator.mavenplugin.targetFolder . |
<targetSchemaFileName> |
String |
- |
The name of the target filename, in which the schema is generated.
This file is stored in the folder, defined in the
targetFolder plugin parameter. Default value is: generated_schema.graphqls .User property is: com.graphql_java_generator.mavenplugin.targetSchemaFileName . |
<templates> |
Map |
- |
Map of the code templates to be used: this allows to override the default templates, and control exactly what code is generated by the plugin. You can override any of the Velocity templates of the project. The list of templates is defined in the enum CodeTemplate, that you can check here. You can find a sample in the CustomTemplates client sample. Important notice: Please note that the default templates may change in the future. And some of these modifications would need to be reported into the custom templates. We'll try to better expose a stable public API in the future. User property is: com.graphql_java_generator.mavenplugin.templates . |
True if the plugin is configured to add the Relay connection capabilities to the field marked by the @RelayConnection directive.
If so, the plugin reads the provided GraphQL schema file(s), and enriches them with the interfaces and types needed to respect the Relay Connection specification. The entry point for that is the @RelayConnection directive.
You'll find all the information on the plugin web site. Please check the server Relay capability page.
boolean
No
com.graphql_java_generator.mavenplugin.addRelayConnections
false
java.lang.Integer
No
com.graphql_java_generator.mavenplugin.maxTokens
2147483647
java.lang.String
No
com.graphql_java_generator.mavenplugin.resourceEncoding
UTF-8
java.io.File
No
com.graphql_java_generator.mavenplugin.schemaFileFolder
src/main/resources
The pattern to find the graphql schema file(s). The default value is "/*.graphqls" meaning that the maven plugin will search all graphqls files in the "/src/main/resources" folder (please check also the schemaFileFolder plugin parameter).
You can put the star (*) joker in the filename, to retrieve several files at ones, for instance /myschema*.graphqls will retrieve the /src/main/resources/myschema.graphqls and /src/main/resources/myschema_extend.graphqls files.
java.lang.String
No
com.graphql_java_generator.mavenplugin.schemaFilePattern
*.graphqls
This parameter is now deprecated: it's value used in the plugin is always true, that is: if the generated sources or resources are older than the GraphQL schema file(s), then there is no source or resource generation. In clear, the source and resource generation is executed only if the provided input (GraphQL schema...) has been updated since the last plugin execution.
boolean
No
com.graphql_java_generator.mavenplugin.skipGenerationIfSchemaHasNotChanged
true
java.io.File
No
com.graphql_java_generator.mavenplugin.targetFolder
/generated-resources/graphql-maven-plugin_generate-relay-schema
java.lang.String
No
com.graphql_java_generator.mavenplugin.targetSchemaFileName
generated_schema.graphqls
Map of the code templates to be used: this allows to override the default templates, and control exactly what code is generated by the plugin.
You can override any of the Velocity templates of the project. The list of templates is defined in the enum CodeTemplate, that you can check here.
You can find a sample in the CustomTemplates client sample.
Important notice: Please note that the default templates may change in the future. And some of these modifications would need to be reported into the custom templates. We'll try to better expose a stable public API in the future.
java.util.Map
No
com.graphql_java_generator.mavenplugin.templates