You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce new configs: typeResolverPrefix, typeResolverSuffix, generateModelsForRootTypes kobylynskyi#206 (kobylynskyi#207)
* Run GitHub workflows for develop branch
* Introduce new configs: typeResolverPrefix, typeResolverSuffix, generateModelsForRootTypes kobylynskyi#206
* Fix some sonar issues
|`modelNamePrefix`| String | Empty | Sets the prefix for GraphQL model classes (type, input, interface, enum, union). |
24
24
|`modelNameSuffix`| String | Empty | Sets the suffix for GraphQL model classes (type, input, interface, enum, union). |
25
25
|`modelValidationAnnotation`| String |@javax.validation.<br>constraints.NotNull | Annotation for mandatory (NonNull) fields. Can be null/empty. |
26
+
|`typeResolverPrefix`| String | Empty | Sets the prefix for GraphQL type resolver classes. |
27
+
|`typeResolverSuffix`| String |`Resolver`| Sets the suffix for GraphQL type resolver classes. |
26
28
|`customTypesMapping`| Map(String,String) | Empty | Can be used to supply custom mappings for scalars. <br/> Supports:<br/> * Map of (GraphqlObjectName.fieldName) to (JavaType) <br/> * Map of (GraphqlType) to (JavaType) |
27
29
|`customAnnotationsMapping`| Map(String,String) | Empty | Can be used to supply custom annotations (serializers) for scalars. <br/> Supports:<br/> * Map of (GraphqlObjectName.fieldName) to (JavaAnnotation) <br/> * Map of (GraphqlType) to (JavaAnnotation) |
28
30
|`fieldsWithResolvers`| Set(String) | Empty | Fields that require Resolvers should be defined here in format: `TypeName.fieldName` or `TypeName`. |
29
31
|`fieldsWithoutResolvers`| Set(String) | Empty | Fields that DO NOT require Resolvers should be defined here in format: `TypeName.fieldName` or `TypeName`. Can be used in conjunction with `generateExtensionFieldsResolvers` option. |
30
32
|`generateParameterizedFieldsResolvers`| Boolean | True | If true, then generate separate `Resolver` interface for parametrized fields. If false, then add field to the type definition and ignore field parameters. |
31
33
|`generateExtensionFieldsResolvers`| Boolean | False | Specifies whether all fields in extensions (`extend type` and `extend interface`) should be present in Resolver interface instead of the type class itself. |
34
+
|`generateModelsForRootTypes`| Boolean | False | Specifies whether model classes should be generated for `type Query`, `type Subscription`, `type Mutation`. |
32
35
|`subscriptionReturnType`| String | Empty | Return type for subscription methods. For example: `org.reactivestreams.Publisher`, `io.reactivex.Observable`, etc. |
33
36
|`generateClient`| Boolean | False | Specifies whether client-side classes should be generated for each query, mutation and subscription. This includes: `Request` classes (contain input data), `ResponseProjection` classes for each type (contain response fields) and `Response` classes (contain response data). |
34
37
|`requestSuffix`| String | Request | Sets the suffix for `Request` classes. |
Copy file name to clipboardExpand all lines: plugins/gradle/graphql-java-codegen-gradle-plugin/src/main/java/io/github/kobylynskyi/graphql/codegen/gradle/GraphQLCodegenGradleTask.java
+46-7Lines changed: 46 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,9 @@ public class GraphQLCodegenGradleTask extends DefaultTask implements GraphQLCode
Copy file name to clipboardExpand all lines: plugins/maven/graphql-java-codegen-maven-plugin/src/main/java/io/github/kobylynskyi/graphql/codegen/GraphQLCodegenMojo.java
+41-2Lines changed: 41 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ public class GraphQLCodegenMojo extends AbstractMojo implements GraphQLCodegenCo
0 commit comments