Please refer to:
- Gradle plugin: grapqhl-java-codegen-gradle-plugin
- Maven plugin: grapqhl-java-codegen-maven-plugin
Key | Data Type | Default value | Description |
---|---|---|---|
graphqlSchemaPaths | List(String) | None | GraphQL schema locations. You can supply multiple paths to GraphQL schemas. |
packageName | String | Empty | Java package for generated classes. |
outputDir | String | None | The output target directory into which code will be generated. |
apiPackage | String | Empty | Java package for generated api classes (Query, Mutation, Subscription). |
modelPackage | String | Empty | Java package for generated model classes (type, input, interface, enum, union). |
generateApis | Boolean | True | Specifies whether api classes should be generated as well as model classes. |
customTypesMapping | Map(String,String) | Empty | Can be used to supply custom mappings for scalars. Supports: * Map of (GraphqlObjectName.fieldName) to (JavaType) * Map of (GraphqlType) to (JavaType) |
customAnnotationsMapping | Map(String,String) | Empty | Can be used to supply custom annotations (serializers) for scalars. Supports: * Map of (GraphqlObjectName.fieldName) to (JavaType) * Map of (GraphqlType) to (JavaType) |
modelValidationAnnotation | String | @javax.validation. constraints.NotNull |
Annotation for mandatory (NonNull) fields. Can be null/empty. |
modelNamePrefix | String | Empty | Sets the prefix for GraphQL model classes (type, input, interface, enum, union). |
modelNameSuffix | String | Empty | Sets the suffix for GraphQL model classes (type, input, interface, enum, union). |
generateEqualsAndHashCode | Boolean | False | Specifies whether generated model classes should have equals and hashCode methods defined. |
generateToString | Boolean | False | Specifies whether generated model classes should have toString method defined. |