Skip to content

Latest commit

 

History

History
 
 

maven-plugin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

SmallRye GraphQL Maven Plugin

This maven plugin allows you to generate the GraphQL Schema on build.

Using the Maven plugin

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.

Configuration options

  • destination - To override the default target/generated/schema.graphql destination

  • includeDependencies - Scan project’s dependencies for GraphQL model classes too. Off (false) by default.

  • includeDependenciesScopes - If the above includeDependencies is true, you can control what scopes should be included. Default is compile, system

  • includeDependenciesTypes - If the above includeDependencies is true, you can control what types should be included. Default is jar

  • includeDependenciesGroupIds - If the above includeDependencies is true, you can control which group ids should be included. Default is empty, which means all group ids.

  • 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.

  • typeAutoNameStrategy - Strategy for transforming class names into GraphQL type names. Valid values are MergeInnerClass, Full and Default.