Class MappingConfig

java.lang.Object
io.github.besi97.graphql.codegen.model.MappingConfig
All Implemented Interfaces:
Combinable<MappingConfig>, GraphQLCodegenConfiguration

public class MappingConfig extends Object implements GraphQLCodegenConfiguration, Combinable<MappingConfig>
The type Mapping config.
  • Constructor Details

    • MappingConfig

      public MappingConfig()
  • Method Details

    • combine

      public void combine(MappingConfig source)
      Description copied from interface: Combinable
      Combine with source.
      Specified by:
      combine in interface Combinable<MappingConfig>
      Parameters:
      source - the source
    • putCustomTypeMappingIfAbsent

      public void putCustomTypeMappingIfAbsent(String from, String to)
      Put custom type mapping if absent.
      Parameters:
      from - the from
      to - the to
    • getCustomTypesMapping

      public Map<String,String> getCustomTypesMapping()
      Description copied from interface: GraphQLCodegenConfiguration
      Can be used to supply custom mappings for scalars.

      Supports:

      • Map of (GraphqlObjectName.fieldName) to (JavaType)
      • Map of (GraphqlType) to (JavaType)

      E.g.:

      • DateTime --- String
      • Price.amount --- java.math.BigDecimal
      Specified by:
      getCustomTypesMapping in interface GraphQLCodegenConfiguration
      Returns:
      mappings from GraphqlType to JavaType
    • setCustomTypesMapping

      public void setCustomTypesMapping(Map<String,String> customTypesMapping)
    • getCustomTemplatesRoot

      public File getCustomTemplatesRoot()
      Description copied from interface: GraphQLCodegenConfiguration
      Can be used to specify the root directory for the custom FreeMaker templates
      Specified by:
      getCustomTemplatesRoot in interface GraphQLCodegenConfiguration
      Returns:
      the directory source for the root directory
    • setCustomTemplatesRoot

      public void setCustomTemplatesRoot(File customTemplatesRoot)
    • getCustomTemplates

      public Map<String,String> getCustomTemplates()
      Description copied from interface: GraphQLCodegenConfiguration
      Can be used to supply paths to custom FreeMarker templates for code generation.
      Specified by:
      getCustomTemplates in interface GraphQLCodegenConfiguration
      Returns:
      a map, where key is a template type and a value is path to a FreeMarker template
    • setCustomTemplates

      public void setCustomTemplates(Map<String,String> customTemplates)
    • putCustomTemplatesIfAbsent

      public void putCustomTemplatesIfAbsent(String from, String to)
      Provide a path to a custom template for the specific FreeMarker template type (if absent).
      Parameters:
      from - the from
      to - the to
    • getCustomAnnotationsMapping

      public Map<String,List<String>> getCustomAnnotationsMapping()
      Description copied from interface: GraphQLCodegenConfiguration
      Can be used to supply custom annotations (serializers) for scalars.

      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)

      Specified by:
      getCustomAnnotationsMapping in interface GraphQLCodegenConfiguration
      Returns:
      mappings from GraphqlType to JavaAnnotation
    • setCustomAnnotationsMapping

      public void setCustomAnnotationsMapping(Map<String,List<String>> customAnnotationsMapping)
    • getDirectiveAnnotationsMapping

      public Map<String,List<String>> getDirectiveAnnotationsMapping()
      Description copied from interface: GraphQLCodegenConfiguration
      Map GraphQL directives to Java annotations.

      Directive fields can be used in annotations via: {{directiveFieldName}}

      Example:

      schema: directive @auth (roles: [String])

      directiveAnnotationsMapping: auth --- @org.springframework.security.access.annotation.Secured({{roles}})

      Specified by:
      getDirectiveAnnotationsMapping in interface GraphQLCodegenConfiguration
      Returns:
      mappings from GraphQL directives to Java annotations.
    • setDirectiveAnnotationsMapping

      public void setDirectiveAnnotationsMapping(Map<String,List<String>> directiveAnnotationsMapping)
    • getPackageName

      public String getPackageName()
      Description copied from interface: GraphQLCodegenConfiguration
      Java package for generated classes.
      Specified by:
      getPackageName in interface GraphQLCodegenConfiguration
      Returns:
      Java package for generated classes.
    • setPackageName

      public void setPackageName(String packageName)
    • getApiPackageName

      public String getApiPackageName()
      Description copied from interface: GraphQLCodegenConfiguration
      Java package for generated api classes (Query, Mutation, Subscription).
      Specified by:
      getApiPackageName in interface GraphQLCodegenConfiguration
      Returns:
      Java package for generated api classes.
    • setApiPackageName

      public void setApiPackageName(String apiPackageName)
    • getModelPackageName

      public String getModelPackageName()
      Description copied from interface: GraphQLCodegenConfiguration
      Java package for generated model classes (type, input, interface, enum, union).
      Specified by:
      getModelPackageName in interface GraphQLCodegenConfiguration
      Returns:
      Java package for generated model classes.
    • setModelPackageName

      public void setModelPackageName(String modelPackageName)
    • getModelNamePrefix

      public String getModelNamePrefix()
      Description copied from interface: GraphQLCodegenConfiguration
      Sets the prefix for GraphQL model classes (type, input, interface, enum, union).
      Specified by:
      getModelNamePrefix in interface GraphQLCodegenConfiguration
      Returns:
      The prefix for GraphQL model classes.
    • setModelNamePrefix

      public void setModelNamePrefix(String modelNamePrefix)
    • getModelNameSuffix

      public String getModelNameSuffix()
      Description copied from interface: GraphQLCodegenConfiguration
      Sets the suffix for GraphQL model classes (type, input, interface, enum, union).
      Specified by:
      getModelNameSuffix in interface GraphQLCodegenConfiguration
      Returns:
      The suffix for GraphQL model classes.
    • setModelNameSuffix

      public void setModelNameSuffix(String modelNameSuffix)
    • getApiNamePrefix

      public String getApiNamePrefix()
      Description copied from interface: GraphQLCodegenConfiguration
      Sets the prefix for GraphQL api classes (query, mutation, subscription).
      Specified by:
      getApiNamePrefix in interface GraphQLCodegenConfiguration
      Returns:
      The prefix for GraphQL api classes.
    • setApiNamePrefix

      public void setApiNamePrefix(String apiNamePrefix)
    • getApiNameSuffix

      public String getApiNameSuffix()
      Description copied from interface: GraphQLCodegenConfiguration
      Sets the suffix for GraphQL api classes (query, mutation, subscription).
      Specified by:
      getApiNameSuffix in interface GraphQLCodegenConfiguration
      Returns:
      The suffix for GraphQL api classes.
    • setApiNameSuffix

      public void setApiNameSuffix(String apiNameSuffix)
    • getTypeResolverPrefix

      public String getTypeResolverPrefix()
      Description copied from interface: GraphQLCodegenConfiguration
      Sets the prefix for GraphQL type resolver classes.
      Specified by:
      getTypeResolverPrefix in interface GraphQLCodegenConfiguration
      Returns:
      The prefix for GraphQL type resolver classes.
    • setTypeResolverPrefix

      public void setTypeResolverPrefix(String typeResolverPrefix)
    • getTypeResolverSuffix

      public String getTypeResolverSuffix()
      Description copied from interface: GraphQLCodegenConfiguration
      Sets the suffix for GraphQL type resolver classes.
      Specified by:
      getTypeResolverSuffix in interface GraphQLCodegenConfiguration
      Returns:
      The suffix for GraphQL type resolver classes.
    • setTypeResolverSuffix

      public void setTypeResolverSuffix(String typeResolverSuffix)
    • getApiRootInterfaceStrategy

      public ApiRootInterfaceStrategy getApiRootInterfaceStrategy()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies the strategy of generating root api interface.
      Specified by:
      getApiRootInterfaceStrategy in interface GraphQLCodegenConfiguration
      Returns:
      strategy of generating root api interface.
    • setApiRootInterfaceStrategy

      public void setApiRootInterfaceStrategy(ApiRootInterfaceStrategy apiRootInterfaceStrategy)
    • getApiInterfaceStrategy

      public ApiInterfaceStrategy getApiInterfaceStrategy()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies the strategy of generating api interfaces.
      Specified by:
      getApiInterfaceStrategy in interface GraphQLCodegenConfiguration
      Returns:
      strategy of generating api interfaces.
    • setApiInterfaceStrategy

      public void setApiInterfaceStrategy(ApiInterfaceStrategy apiInterfaceStrategy)
    • getApiNamePrefixStrategy

      public ApiNamePrefixStrategy getApiNamePrefixStrategy()
      Description copied from interface: GraphQLCodegenConfiguration
      Sets prefix strategy for GraphQL api classes (query, mutation, subscription).
      Specified by:
      getApiNamePrefixStrategy in interface GraphQLCodegenConfiguration
      Returns:
      Prefix strategy for GraphQL api classes.
    • setApiNamePrefixStrategy

      public void setApiNamePrefixStrategy(ApiNamePrefixStrategy apiNamePrefixStrategy)
    • getModelValidationAnnotation

      public String getModelValidationAnnotation()
      Description copied from interface: GraphQLCodegenConfiguration
      Annotation for mandatory (NonNull) fields. Can be null/empty.
      Specified by:
      getModelValidationAnnotation in interface GraphQLCodegenConfiguration
      Returns:
      Annotation for mandatory (NonNull) fields
    • setModelValidationAnnotation

      public void setModelValidationAnnotation(String modelValidationAnnotation)
    • getApiReturnType

      public String getApiReturnType()
      Description copied from interface: GraphQLCodegenConfiguration
      Return type for api methods (query / subscription) For example: reactor.core.publisher.Mono
      Specified by:
      getApiReturnType in interface GraphQLCodegenConfiguration
      Returns:
      Return type for api methods (query / subscription)
    • setApiReturnType

      public void setApiReturnType(String apiReturnType)
    • getApiReturnListType

      public String getApiReturnListType()
      Description copied from interface: GraphQLCodegenConfiguration
      Return type for api methods (query / subscription) that return list values For example: reactor.core.publisher.Flux
      Specified by:
      getApiReturnListType in interface GraphQLCodegenConfiguration
      Returns:
      Return type for api methods (query / subscription) that return list values
    • setApiReturnListType

      public void setApiReturnListType(String apiReturnListType)
    • getSubscriptionReturnType

      public String getSubscriptionReturnType()
      Description copied from interface: GraphQLCodegenConfiguration
      Return type for subscription methods. For example: org.reactivestreams.Publisher, io.reactivex.Observable, etc.
      Specified by:
      getSubscriptionReturnType in interface GraphQLCodegenConfiguration
      Returns:
      Return type for subscription methods
    • setSubscriptionReturnType

      public void setSubscriptionReturnType(String subscriptionReturnType)
    • getGenerateApis

      public Boolean getGenerateApis()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether api classes should be generated.
      Specified by:
      getGenerateApis in interface GraphQLCodegenConfiguration
      Returns:
      true is API interfaces should be generated.
    • setGenerateApis

      public void setGenerateApis(Boolean generateApis)
    • getGenerateBuilder

      public Boolean getGenerateBuilder()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether generated model classes should have builder.
      Specified by:
      getGenerateBuilder in interface GraphQLCodegenConfiguration
      Returns:
      true if generated model classes should have builder.
    • setGenerateBuilder

      public void setGenerateBuilder(Boolean generateBuilder)
    • getGenerateEqualsAndHashCode

      public Boolean getGenerateEqualsAndHashCode()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether generated model classes should have equals and hashCode methods defined.
      Specified by:
      getGenerateEqualsAndHashCode in interface GraphQLCodegenConfiguration
      Returns:
      true if generated model classes should have equals and hashCode methods defined.
    • setGenerateEqualsAndHashCode

      public void setGenerateEqualsAndHashCode(Boolean generateEqualsAndHashCode)
    • getGenerateToString

      public Boolean getGenerateToString()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether generated model classes should have toString method defined.
      Specified by:
      getGenerateToString in interface GraphQLCodegenConfiguration
      Returns:
      true if generated model classes should have toString method defined.
    • setGenerateToString

      public void setGenerateToString(Boolean generateToString)
    • getGenerateImmutableModels

      public Boolean getGenerateImmutableModels()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether generated model classes should be immutable.
      Specified by:
      getGenerateImmutableModels in interface GraphQLCodegenConfiguration
      Returns:
      true if generated model classes should be immutable.
    • setGenerateImmutableModels

      public void setGenerateImmutableModels(Boolean generateImmutableModels)
    • getGenerateParameterizedFieldsResolvers

      public Boolean getGenerateParameterizedFieldsResolvers()
      Description copied from interface: GraphQLCodegenConfiguration
      If true, then generate separate `Resolver` interface for parametrized fields. If false, then add field to the type definition and ignore field parameters.
      Specified by:
      getGenerateParameterizedFieldsResolvers in interface GraphQLCodegenConfiguration
      Returns:
      true if separate `Resolver` interface for parametrized fields should be generated. false if field should be added to the type definition and field parameters should be ignored.
    • setGenerateParameterizedFieldsResolvers

      public void setGenerateParameterizedFieldsResolvers(Boolean generateParameterizedFieldsResolvers)
    • getGenerateExtensionFieldsResolvers

      public Boolean getGenerateExtensionFieldsResolvers()
      Description copied from interface: GraphQLCodegenConfiguration
      Whether all fields in extensions (extend type and extend interface) should be present in Resolver interface instead of the type class itself.
      Specified by:
      getGenerateExtensionFieldsResolvers in interface GraphQLCodegenConfiguration
      Returns:
      true if all fields in extensions (extend type and extend interface) should be present in Resolver interface instead of the type class itself.
    • setGenerateExtensionFieldsResolvers

      public void setGenerateExtensionFieldsResolvers(Boolean generateExtensionFieldsResolvers)
    • getGenerateDataFetchingEnvironmentArgumentInApis

      public Boolean getGenerateDataFetchingEnvironmentArgumentInApis()
      Description copied from interface: GraphQLCodegenConfiguration
      If true, then graphql.schema.DataFetchingEnvironment env will be added as a last argument to all methods of root type resolvers and field resolvers.
      Specified by:
      getGenerateDataFetchingEnvironmentArgumentInApis in interface GraphQLCodegenConfiguration
      Returns:
      true if graphql.schema.DataFetchingEnvironment env should be added as a last argument in all API interfaces methods.
    • setGenerateDataFetchingEnvironmentArgumentInApis

      public void setGenerateDataFetchingEnvironmentArgumentInApis(Boolean generateDataFetchingEnvironmentArgumentInApis)
    • getGenerateApisWithThrowsException

      public Boolean getGenerateApisWithThrowsException()
      Description copied from interface: GraphQLCodegenConfiguration
      Whether signatures of API interface methods should have throws Exception.
      Specified by:
      getGenerateApisWithThrowsException in interface GraphQLCodegenConfiguration
      Returns:
      true if API interfaces methods signature should contain throws Exception.
    • setGenerateApisWithThrowsException

      public void setGenerateApisWithThrowsException(Boolean generateApisWithThrowsException)
    • getGenerateApisWithSuspendFunctions

      public Boolean getGenerateApisWithSuspendFunctions()
      Description copied from interface: GraphQLCodegenConfiguration
      Whether signatures of API interface methods should have suspend modifier.
      Specified by:
      getGenerateApisWithSuspendFunctions in interface GraphQLCodegenConfiguration
      Returns:
      true if API interfaces methods signature should contain suspend modifier.
    • setGenerateApisWithSuspendFunctions

      public void setGenerateApisWithSuspendFunctions(Boolean generateApisWithSuspendFunctions)
    • getAddGeneratedAnnotation

      public Boolean getAddGeneratedAnnotation()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether generated classes should be annotated with @Generated
      Specified by:
      getAddGeneratedAnnotation in interface GraphQLCodegenConfiguration
      Returns:
      true if classes should be annotated with @Generated
    • setAddGeneratedAnnotation

      public void setAddGeneratedAnnotation(Boolean addGeneratedAnnotation)
    • getGenerateJacksonTypeIdResolver

      public Boolean getGenerateJacksonTypeIdResolver()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether generated union interfaces should be annotated with a Jackson type id resolver generated in model package.
      Specified by:
      getGenerateJacksonTypeIdResolver in interface GraphQLCodegenConfiguration
      Returns:
      true if union interfaces should be annotated with a Jackson type id resolver generated in model package
    • setGenerateJacksonTypeIdResolver

      public void setGenerateJacksonTypeIdResolver(Boolean generateJacksonTypeIdResolver)
    • getRelayConfig

      public RelayConfig getRelayConfig()
      Description copied from interface: GraphQLCodegenConfiguration
      Relay-related configurations.
      Specified by:
      getRelayConfig in interface GraphQLCodegenConfiguration
      Returns:
      Relay-related configurations.
    • setRelayConfig

      public void setRelayConfig(RelayConfig relayConfig)
    • getGenerateModelsForRootTypes

      public Boolean getGenerateModelsForRootTypes()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether model classes should be generated for Query/Subscription/Mutation.
      Specified by:
      getGenerateModelsForRootTypes in interface GraphQLCodegenConfiguration
      Returns:
      true is model classes (POJOs) should be generated for GraphQL root types.
    • setGenerateModelsForRootTypes

      public void setGenerateModelsForRootTypes(Boolean generateModelsForRootTypes)
    • getUseOptionalForNullableReturnTypes

      public Boolean getUseOptionalForNullableReturnTypes()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether return types of generated API interface should be wrapped into java.util.Optional
      Specified by:
      getUseOptionalForNullableReturnTypes in interface GraphQLCodegenConfiguration
      Returns:
      true if return types should be wrapped into java.util.Optional
    • setUseOptionalForNullableReturnTypes

      public void setUseOptionalForNullableReturnTypes(Boolean useOptionalForNullableReturnTypes)
    • getUseWrapperForNullableInputTypes

      public Boolean getUseWrapperForNullableInputTypes()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether input types of generated input classes should be wrapped into ArgumentValue.
      Specified by:
      getUseWrapperForNullableInputTypes in interface GraphQLCodegenConfiguration
      Returns:
      true if input types should be wrapped into ArgumentValue
    • setUseWrapperForNullableInputTypes

      public void setUseWrapperForNullableInputTypes(Boolean useWrapperForNullableInputTypes)
    • getFieldsWithResolvers

      public Set<String> getFieldsWithResolvers()
      Description copied from interface: GraphQLCodegenConfiguration
      Fields that require Resolvers.

      Values should be defined here in format: TypeName, TypeName.fieldName, @directive

      If just type is specified, then all fields of this type will have resolvers.

      E.g.:

      • Person
      • Person.friends
      • @customResolver
      Specified by:
      getFieldsWithResolvers in interface GraphQLCodegenConfiguration
      Returns:
      Set of types and fields that should have Resolver interfaces.
    • setFieldsWithResolvers

      public void setFieldsWithResolvers(Set<String> fieldsWithResolvers)
    • getFieldsWithoutResolvers

      public Set<String> getFieldsWithoutResolvers()
      Description copied from interface: GraphQLCodegenConfiguration
      Fields that DO NOT require Resolvers.

      Values should be defined here in format: TypeName, TypeName.fieldName, @directive

      If just type is specified, then all fields of this type will NOT have resolvers.

      Can be used in conjunction with generateExtensionFieldsResolvers

      E.g.:

      • Person
      • Person.friends
      • @customResolver
      Specified by:
      getFieldsWithoutResolvers in interface GraphQLCodegenConfiguration
      Returns:
      Set of types and fields that should NOT have Resolver interfaces.
    • setFieldsWithoutResolvers

      public void setFieldsWithoutResolvers(Set<String> fieldsWithoutResolvers)
    • getFieldsToExcludeFromGeneration

      public Set<String> getFieldsToExcludeFromGeneration()
      Description copied from interface: GraphQLCodegenConfiguration
      Fields that WILL NOT be generated.

      Values should be defined here in format: TypeName.fieldName

      E.g.:

      • Person.friends
      Specified by:
      getFieldsToExcludeFromGeneration in interface GraphQLCodegenConfiguration
      Returns:
      Set of types and fields that should NOT be generated.
    • setFieldsToExcludeFromGeneration

      public void setFieldsToExcludeFromGeneration(Set<String> fieldsToExcludeFromGeneration)
    • getFieldsWithDataFetcherResult

      public Set<String> getFieldsWithDataFetcherResult()
      Description copied from interface: GraphQLCodegenConfiguration
      Fields that require DataFetcherResult.

      Values should be defined here in format: TypeName, TypeName.fieldName, @directive

      E.g.:

      • @dataFetcherResult
      Specified by:
      getFieldsWithDataFetcherResult in interface GraphQLCodegenConfiguration
      Returns:
      Set of types and fields that should have DataFetcherResult.
    • setFieldsWithDataFetcherResult

      public void setFieldsWithDataFetcherResult(Set<String> fieldsWithDataFetcherResult)
    • getQueryResolverParentInterface

      public String getQueryResolverParentInterface()
      Description copied from interface: GraphQLCodegenConfiguration
      Interface that will be added as "extend" to all generated api Query interfaces.
      Specified by:
      getQueryResolverParentInterface in interface GraphQLCodegenConfiguration
      Returns:
      Parent interface of all GraphQL Query types.
    • setQueryResolverParentInterface

      public void setQueryResolverParentInterface(String queryResolverParentInterface)
    • getMutationResolverParentInterface

      public String getMutationResolverParentInterface()
      Description copied from interface: GraphQLCodegenConfiguration
      Interface that will be added as "extend" to all generated api Mutation interfaces.
      Specified by:
      getMutationResolverParentInterface in interface GraphQLCodegenConfiguration
      Returns:
      Parent interface of all GraphQL Mutation types.
    • setMutationResolverParentInterface

      public void setMutationResolverParentInterface(String mutationResolverParentInterface)
    • getSubscriptionResolverParentInterface

      public String getSubscriptionResolverParentInterface()
      Description copied from interface: GraphQLCodegenConfiguration
      Interface that will be added as "extend" to all generated api Subscription interfaces.
      Specified by:
      getSubscriptionResolverParentInterface in interface GraphQLCodegenConfiguration
      Returns:
      Parent interface of all GraphQL Subscription types.
    • setSubscriptionResolverParentInterface

      public void setSubscriptionResolverParentInterface(String subscriptionResolverParentInterface)
    • getResolverParentInterface

      public String getResolverParentInterface()
      Description copied from interface: GraphQLCodegenConfiguration
      Interface that will be added as "extend" to all generated TypeResolver interfaces.
      Specified by:
      getResolverParentInterface in interface GraphQLCodegenConfiguration
      Returns:
      Parent interface of all Resolvers of GraphQL types.
    • setResolverParentInterface

      public void setResolverParentInterface(String resolverParentInterface)
    • getGenerateClient

      public Boolean getGenerateClient()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies whether client-side classes should be generated for each query, mutation and subscription. This includes: `Request` class (contains input data) and `ResponseProjection` class (contains response fields).
      Specified by:
      getGenerateClient in interface GraphQLCodegenConfiguration
      Returns:
      true if client-side classes should be generated (`Request`, `Response` and `ResponseProjection`)
    • setGenerateClient

      public void setGenerateClient(Boolean generateClient)
    • getRequestSuffix

      public String getRequestSuffix()
      Description copied from interface: GraphQLCodegenConfiguration
      The suffix for `Request` classes.
      Specified by:
      getRequestSuffix in interface GraphQLCodegenConfiguration
      Returns:
      The suffix for `Request` classes.
    • setRequestSuffix

      public void setRequestSuffix(String requestSuffix)
    • getResponseSuffix

      public String getResponseSuffix()
      Description copied from interface: GraphQLCodegenConfiguration
      The suffix for `Response` classes.
      Specified by:
      getResponseSuffix in interface GraphQLCodegenConfiguration
      Returns:
      The suffix for `Response` classes.
    • setResponseSuffix

      public void setResponseSuffix(String responseSuffix)
    • getResponseProjectionSuffix

      public String getResponseProjectionSuffix()
      Description copied from interface: GraphQLCodegenConfiguration
      The suffix for `ResponseProjection` classes.
      Specified by:
      getResponseProjectionSuffix in interface GraphQLCodegenConfiguration
      Returns:
      The suffix for `ResponseProjection` classes.
    • setResponseProjectionSuffix

      public void setResponseProjectionSuffix(String responseProjectionSuffix)
    • getParametrizedInputSuffix

      public String getParametrizedInputSuffix()
      Description copied from interface: GraphQLCodegenConfiguration
      The suffix for `ParametrizedInput` classes.
      Specified by:
      getParametrizedInputSuffix in interface GraphQLCodegenConfiguration
      Returns:
      The suffix for `ParametrizedInput` classes.
    • setParametrizedInputSuffix

      public void setParametrizedInputSuffix(String parametrizedInputSuffix)
    • getGenerateAllMethodInProjection

      public Boolean getGenerateAllMethodInProjection()
      Description copied from interface: GraphQLCodegenConfiguration
      Enables the generation of the all$ method in the projection classes of the client.
      Specified by:
      getGenerateAllMethodInProjection in interface GraphQLCodegenConfiguration
      Returns:
      whether the generation is enabled.
    • setGenerateAllMethodInProjection

      public void setGenerateAllMethodInProjection(Boolean generateAllMethodInProjection)
    • getResponseProjectionMaxDepth

      public Integer getResponseProjectionMaxDepth()
      Description copied from interface: GraphQLCodegenConfiguration
      Limit depth when `all$` invoke which has subProjections
      Specified by:
      getResponseProjectionMaxDepth in interface GraphQLCodegenConfiguration
      Returns:
      limit depth when the projection is constructed automatically
    • setResponseProjectionMaxDepth

      public void setResponseProjectionMaxDepth(Integer responseProjectionMaxDepth)
    • getUseObjectMapperForRequestSerialization

      public Set<String> getUseObjectMapperForRequestSerialization()
      Description copied from interface: GraphQLCodegenConfiguration
      Fields that require serialization using ObjectMapper.writeValueAsString(Object)

      Values should be defined here in format: GraphqlObjectName.fieldName or GraphqlTypeName

      If just type is specified, then all fields of this type will be serialized using ObjectMapper.

      E.g.:

      • Person.createdDateTime
      • ZonedDateTime
      Specified by:
      getUseObjectMapperForRequestSerialization in interface GraphQLCodegenConfiguration
      Returns:
      Set of types and fields that should be serialized using ObjectMapper.writeValueAsString(Object)
    • setUseObjectMapperForRequestSerialization

      public void setUseObjectMapperForRequestSerialization(Set<String> useObjectMapperForRequestSerialization)
    • getResolverArgumentAnnotations

      public Set<String> getResolverArgumentAnnotations()
      Description copied from interface: GraphQLCodegenConfiguration
      Annotations that will be added to all resolver arguments.

      E.g.:

      • @org.springframework.graphql.data.method.annotation.Argument
      Specified by:
      getResolverArgumentAnnotations in interface GraphQLCodegenConfiguration
      Returns:
      Set of annotations that every resolver argument will have.
    • setResolverArgumentAnnotations

      public void setResolverArgumentAnnotations(Set<String> resolverArgumentAnnotations)
    • getParametrizedResolverAnnotations

      public Set<String> getParametrizedResolverAnnotations()
      Description copied from interface: GraphQLCodegenConfiguration
      Annotations that will be added to all parametrized resolver methods.

      E.g.:

      • @org.springframework.graphql.data.method.annotation.Argument
      Specified by:
      getParametrizedResolverAnnotations in interface GraphQLCodegenConfiguration
      Returns:
      Set of annotations that every parametrized resolver method will have.
    • setParametrizedResolverAnnotations

      public void setParametrizedResolverAnnotations(Set<String> parametrizedResolverAnnotations)
    • getTypesAsInterfaces

      public Set<String> getTypesAsInterfaces()
      Description copied from interface: GraphQLCodegenConfiguration
      Types that must generated as interfaces.

      Values should be defined here in format: TypeName, @directive

      E.g.:

      • Person
      • @asInterface
      Specified by:
      getTypesAsInterfaces in interface GraphQLCodegenConfiguration
      Returns:
      Set of types that should generated as interfaces.
    • setTypesAsInterfaces

      public void setTypesAsInterfaces(Set<String> typesAsInterfaces)
    • getUnknownFieldsPropertyName

      public String getUnknownFieldsPropertyName()
      Description copied from interface: GraphQLCodegenConfiguration
      Specifies the name of the property to be included in api classes to support unknown fields during serialization or deserialization
      Specified by:
      getUnknownFieldsPropertyName in interface GraphQLCodegenConfiguration
      Returns:
      The name of the property to store unknown fields
    • setUnknownFieldsPropertyName

      public void setUnknownFieldsPropertyName(String unknownFieldsPropertyName)
    • getGeneratedAnnotation

      public String getGeneratedAnnotation()
      Description copied from interface: GraphQLCodegenConfiguration
      Returns a qualified class name (with package) of the Generated annotation that will be added on top of every generated class.
      Specified by:
      getGeneratedAnnotation in interface GraphQLCodegenConfiguration
      Returns:
      The name of the class for @Generated annotation
      See Also:
      • "jakarta.annotation.Generated"
      • "javax.annotation.processing.Generated"
      • "javax.annotation.Generated"
    • setGeneratedAnnotation

      public void setGeneratedAnnotation(String generatedAnnotation)
    • isSupportUnknownFields

      public Boolean isSupportUnknownFields()
      Specified by:
      isSupportUnknownFields in interface GraphQLCodegenConfiguration
    • setSupportUnknownFields

      public void setSupportUnknownFields(Boolean supportUnknownFields)
    • getGeneratedLanguage

      public GeneratedLanguage getGeneratedLanguage()
      Description copied from interface: GraphQLCodegenConfiguration
      Generate code with lang
      Specified by:
      getGeneratedLanguage in interface GraphQLCodegenConfiguration
      Returns:
      GeneratedLanguage.KOTLIN or GeneratedLanguage.JAVA
    • setGeneratedLanguage

      public void setGeneratedLanguage(GeneratedLanguage generatedLanguage)
    • isGenerateModelOpenClasses

      public Boolean isGenerateModelOpenClasses()
      Specified by:
      isGenerateModelOpenClasses in interface GraphQLCodegenConfiguration
    • setGenerateModelOpenClasses

      public void setGenerateModelOpenClasses(boolean generateModelOpenClasses)
    • isInitializeNullableTypes

      public Boolean isInitializeNullableTypes()
      Specified by:
      isInitializeNullableTypes in interface GraphQLCodegenConfiguration
    • setInitializeNullableTypes

      public void setInitializeNullableTypes(boolean initializeNullableTypes)
    • isGenerateSealedInterfaces

      public Boolean isGenerateSealedInterfaces()
      Specified by:
      isGenerateSealedInterfaces in interface GraphQLCodegenConfiguration
    • setGenerateSealedInterfaces

      public void setGenerateSealedInterfaces(boolean generateSealedInterfaces)
    • isGenerateNoArgsConstructorOnly

      public Boolean isGenerateNoArgsConstructorOnly()
      Specified by:
      isGenerateNoArgsConstructorOnly in interface GraphQLCodegenConfiguration
    • setGenerateNoArgsConstructorOnly

      public void setGenerateNoArgsConstructorOnly(Boolean generateNoArgsConstructorOnly)
    • isGenerateModelsWithPublicFields

      public Boolean isGenerateModelsWithPublicFields()
      Specified by:
      isGenerateModelsWithPublicFields in interface GraphQLCodegenConfiguration
    • setGenerateModelsWithPublicFields

      public void setGenerateModelsWithPublicFields(Boolean generateModelsWithPublicFields)