This maven plugin allows you to generate the GraphQL Schema on build.
Add this to your pom.xml:
<plugin>
<artifactId>smallrye-graphql-maven-plugin</artifactId>
<groupId>io.smallrye</groupId>
<executions>
<execution>
<goals>
<goal>generate-schema</goal>
</goals>
</execution>
</executions>
</plugin>
The schema will appear as target/generated/schema.graphql
by default.
-
destination
- To override the defaulttarget/generated/schema.graphql
destination -
includeDependencies
- Scan project’s dependencies for GraphQL model classes too. Off (false) by default. -
includeDependenciesScopes
- If the aboveincludeDependencies
is true, you can control what scopes should be included. Default iscompile, system
-
includeDependenciesTypes
- If the aboveincludeDependencies
is true, you can control what types should be included. Default isjar
-
includeScalars
- Include scalars in the schema. Default false. -
includeDirectives
- Include directives in the schema. Default false. -
includeSchemaDefinition
- Include the schema definition. Default false. -
includeIntrospectionTypes
- Include the introspection types in the schema. Default false.