public class MappingContext extends java.lang.Object implements GraphQLCodegenConfiguration
Constructor and Description |
---|
MappingContext() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApiPackageName()
Java package for generated api classes (Query, Mutation, Subscription).
|
java.util.Map<java.lang.String,java.lang.String> |
getCustomAnnotationsMapping()
Can be used to supply custom annotations (serializers) for scalars.
|
java.util.Map<java.lang.String,java.lang.String> |
getCustomTypesMapping()
Can be used to supply custom mappings for scalars.
|
java.util.Set<java.lang.String> |
getFieldsWithoutResolvers()
Fields that DO NOT require Resolvers should be defined here in format: TypeName.fieldName
If just type is specified, then all fields of this type will NOT have resolvers
Can be used in conjunction with "generateExtensionFieldsResolvers"
|
java.util.Set<java.lang.String> |
getFieldsWithResolvers()
Fields that require Resolvers should be defined here in format: TypeName.fieldName
If just type is specified, then all fields of this type will have resolvers
|
java.lang.Boolean |
getGenerateApis()
Specifies whether api classes should be generated.
|
java.lang.Boolean |
getGenerateAsyncApi()
If true, then wrap type into `java.util.concurrent.CompletableFuture` or `subscriptionReturnType`
|
java.lang.Boolean |
getGenerateBuilder()
Specifies whether generated model classes should have builder.
|
java.lang.Boolean |
getGenerateDataFetchingEnvironmentArgumentInApis()
If true, then graphql.schema.DataFetchingEnvironment env will be added as a last argument
to all methods of root type resolvers and field resolvers.
|
java.lang.Boolean |
getGenerateEqualsAndHashCode()
Specifies whether generated model classes should have equals and hashCode methods defined.
|
java.lang.Boolean |
getGenerateExtensionFieldsResolvers()
Whether all fields in extensions (
extend type and extend interface ) should be present
in Resolver interface instead of the type class itself. |
java.lang.Boolean |
getGenerateParameterizedFieldsResolvers()
If true, then generate separate `Resolver` interface for parametrized fields.
|
java.lang.Boolean |
getGenerateRequests()
Specifies whether client-side classes should be generated for each query, mutation and subscription.
|
java.lang.Boolean |
getGenerateToString()
Specifies whether generated model classes should have toString method defined.
|
java.lang.String |
getModelNamePrefix()
Sets the prefix for GraphQL model classes (type, input, interface, enum, union).
|
java.lang.String |
getModelNameSuffix()
Sets the suffix for GraphQL model classes (type, input, interface, enum, union).
|
java.lang.String |
getModelPackageName()
Java package for generated model classes (type, input, interface, enum, union).
|
java.lang.String |
getModelValidationAnnotation()
Annotation for mandatory (NonNull) fields.
|
java.lang.String |
getPackageName()
Java package for generated classes.
|
java.lang.String |
getRequestSuffix()
The suffix for `Request` classes.
|
java.lang.String |
getResponseProjectionSuffix()
The suffix for `ResponseProjection` classes.
|
java.lang.String |
getSubscriptionReturnType()
Return type for subscription methods.
|
public java.util.Map<java.lang.String,java.lang.String> getCustomTypesMapping()
GraphQLCodegenConfiguration
Supports: * Map of (GraphqlObjectName.fieldName) to (JavaType) * Map of (GraphqlType) to (JavaType)
e.g.: DateTime --- String e.g.: Price.amount --- java.math.BigDecimal
getCustomTypesMapping
in interface GraphQLCodegenConfiguration
public java.util.Map<java.lang.String,java.lang.String> getCustomAnnotationsMapping()
GraphQLCodegenConfiguration
Supports: * Map of (GraphqlObjectName.fieldName) to (JavaAnnotation) * Map of (GraphqlType) to (JavaAnnotation)
e.g.: EpochMillis --- com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.example.json.EpochMillisScalarDeserializer.class)
getCustomAnnotationsMapping
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateApis()
GraphQLCodegenConfiguration
getGenerateApis
in interface GraphQLCodegenConfiguration
public java.lang.String getPackageName()
GraphQLCodegenConfiguration
getPackageName
in interface GraphQLCodegenConfiguration
public java.lang.String getApiPackageName()
GraphQLCodegenConfiguration
getApiPackageName
in interface GraphQLCodegenConfiguration
public java.lang.String getModelPackageName()
GraphQLCodegenConfiguration
getModelPackageName
in interface GraphQLCodegenConfiguration
public java.lang.String getModelNamePrefix()
GraphQLCodegenConfiguration
getModelNamePrefix
in interface GraphQLCodegenConfiguration
public java.lang.String getModelNameSuffix()
GraphQLCodegenConfiguration
getModelNameSuffix
in interface GraphQLCodegenConfiguration
public java.lang.String getModelValidationAnnotation()
GraphQLCodegenConfiguration
getModelValidationAnnotation
in interface GraphQLCodegenConfiguration
public java.lang.String getSubscriptionReturnType()
GraphQLCodegenConfiguration
getSubscriptionReturnType
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateBuilder()
GraphQLCodegenConfiguration
getGenerateBuilder
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateEqualsAndHashCode()
GraphQLCodegenConfiguration
getGenerateEqualsAndHashCode
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateToString()
GraphQLCodegenConfiguration
getGenerateToString
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateAsyncApi()
GraphQLCodegenConfiguration
getGenerateAsyncApi
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateParameterizedFieldsResolvers()
GraphQLCodegenConfiguration
getGenerateParameterizedFieldsResolvers
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateExtensionFieldsResolvers()
GraphQLCodegenConfiguration
extend type
and extend interface
) should be present
in Resolver interface instead of the type class itself.getGenerateExtensionFieldsResolvers
in interface GraphQLCodegenConfiguration
extend type
and extend interface
)
should be present in Resolver interface instead of the type class itself.public java.lang.Boolean getGenerateDataFetchingEnvironmentArgumentInApis()
GraphQLCodegenConfiguration
getGenerateDataFetchingEnvironmentArgumentInApis
in interface GraphQLCodegenConfiguration
public java.util.Set<java.lang.String> getFieldsWithResolvers()
GraphQLCodegenConfiguration
E.g.: "Person.friends" E.g.: "Person"
getFieldsWithResolvers
in interface GraphQLCodegenConfiguration
public java.util.Set<java.lang.String> getFieldsWithoutResolvers()
GraphQLCodegenConfiguration
E.g.: "Person.friends" E.g.: "Person"
getFieldsWithoutResolvers
in interface GraphQLCodegenConfiguration
public java.lang.Boolean getGenerateRequests()
GraphQLCodegenConfiguration
getGenerateRequests
in interface GraphQLCodegenConfiguration
public java.lang.String getRequestSuffix()
GraphQLCodegenConfiguration
getRequestSuffix
in interface GraphQLCodegenConfiguration
public java.lang.String getResponseProjectionSuffix()
GraphQLCodegenConfiguration
getResponseProjectionSuffix
in interface GraphQLCodegenConfiguration