Class GraphQLCodegenMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.github.kobylynskyi.graphql.codegen.GraphQLCodegenMojo
All Implemented Interfaces:
com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="generate", defaultPhase=GENERATE_SOURCES, threadSafe=true) public class GraphQLCodegenMojo extends org.apache.maven.plugin.AbstractMojo implements com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
GraphQL Codegen MOJO implementation
  • Constructor Details

    • GraphQLCodegenMojo

      public GraphQLCodegenMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getGraphqlSchemaPaths

      public String[] getGraphqlSchemaPaths()
    • getGraphqlQueryIntrospectionResultPath

      public String getGraphqlQueryIntrospectionResultPath()
    • getGraphqlSchemas

      public SchemaFinderConfig getGraphqlSchemas()
    • getOutputDir

      public File getOutputDir()
    • getCustomTypesMapping

      public Map<String,String> getCustomTypesMapping()
      Specified by:
      getCustomTypesMapping in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getCustomAnnotationsMapping

      public Map<String,List<String>> getCustomAnnotationsMapping()
      Specified by:
      getCustomAnnotationsMapping in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getDirectiveAnnotationsMapping

      public Map<String,List<String>> getDirectiveAnnotationsMapping()
      Specified by:
      getDirectiveAnnotationsMapping in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getPackageName

      public String getPackageName()
      Specified by:
      getPackageName in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiPackageName

      public String getApiPackageName()
      Specified by:
      getApiPackageName in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiNamePrefix

      public String getApiNamePrefix()
      Specified by:
      getApiNamePrefix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiNameSuffix

      public String getApiNameSuffix()
      Specified by:
      getApiNameSuffix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getModelPackageName

      public String getModelPackageName()
      Specified by:
      getModelPackageName in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getModelNamePrefix

      public String getModelNamePrefix()
      Specified by:
      getModelNamePrefix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getModelNameSuffix

      public String getModelNameSuffix()
      Specified by:
      getModelNameSuffix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getModelValidationAnnotation

      public String getModelValidationAnnotation()
      Specified by:
      getModelValidationAnnotation in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateBuilder

      public Boolean getGenerateBuilder()
      Specified by:
      getGenerateBuilder in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateApis

      public Boolean getGenerateApis()
      Specified by:
      getGenerateApis in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateModelsForRootTypes

      public Boolean getGenerateModelsForRootTypes()
      Specified by:
      getGenerateModelsForRootTypes in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateEqualsAndHashCode

      public Boolean getGenerateEqualsAndHashCode()
      Specified by:
      getGenerateEqualsAndHashCode in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateImmutableModels

      public Boolean getGenerateImmutableModels()
      Specified by:
      getGenerateImmutableModels in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateToString

      public Boolean getGenerateToString()
      Specified by:
      getGenerateToString in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiReturnType

      public String getApiReturnType()
      Specified by:
      getApiReturnType in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiReturnListType

      public String getApiReturnListType()
      Specified by:
      getApiReturnListType in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getSubscriptionReturnType

      public String getSubscriptionReturnType()
      Specified by:
      getSubscriptionReturnType in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateExtensionFieldsResolvers

      public Boolean getGenerateExtensionFieldsResolvers()
      Specified by:
      getGenerateExtensionFieldsResolvers in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateParameterizedFieldsResolvers

      public Boolean getGenerateParameterizedFieldsResolvers()
      Specified by:
      getGenerateParameterizedFieldsResolvers in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getTypeResolverPrefix

      public String getTypeResolverPrefix()
      Specified by:
      getTypeResolverPrefix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getTypeResolverSuffix

      public String getTypeResolverSuffix()
      Specified by:
      getTypeResolverSuffix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateDataFetchingEnvironmentArgumentInApis

      public Boolean getGenerateDataFetchingEnvironmentArgumentInApis()
      Specified by:
      getGenerateDataFetchingEnvironmentArgumentInApis in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getRelayConfig

      public com.kobylynskyi.graphql.codegen.model.RelayConfig getRelayConfig()
      Specified by:
      getRelayConfig in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getUseOptionalForNullableReturnTypes

      public Boolean getUseOptionalForNullableReturnTypes()
      Specified by:
      getUseOptionalForNullableReturnTypes in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateApisWithThrowsException

      public Boolean getGenerateApisWithThrowsException()
      Specified by:
      getGenerateApisWithThrowsException in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateApisWithSuspendFunctions

      public Boolean getGenerateApisWithSuspendFunctions()
      Specified by:
      getGenerateApisWithSuspendFunctions in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateJacksonTypeIdResolver

      public Boolean getGenerateJacksonTypeIdResolver()
      Specified by:
      getGenerateJacksonTypeIdResolver in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getAddGeneratedAnnotation

      public Boolean getAddGeneratedAnnotation()
      Specified by:
      getAddGeneratedAnnotation in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGeneratedAnnotation

      public String getGeneratedAnnotation()
      Specified by:
      getGeneratedAnnotation in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiRootInterfaceStrategy

      public com.kobylynskyi.graphql.codegen.model.ApiRootInterfaceStrategy getApiRootInterfaceStrategy()
      Specified by:
      getApiRootInterfaceStrategy in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiInterfaceStrategy

      public com.kobylynskyi.graphql.codegen.model.ApiInterfaceStrategy getApiInterfaceStrategy()
      Specified by:
      getApiInterfaceStrategy in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getApiNamePrefixStrategy

      public com.kobylynskyi.graphql.codegen.model.ApiNamePrefixStrategy getApiNamePrefixStrategy()
      Specified by:
      getApiNamePrefixStrategy in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getFieldsWithResolvers

      public Set<String> getFieldsWithResolvers()
      Specified by:
      getFieldsWithResolvers in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getFieldsWithoutResolvers

      public Set<String> getFieldsWithoutResolvers()
      Specified by:
      getFieldsWithoutResolvers in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getFieldsToExcludeFromGeneration

      public Set<String> getFieldsToExcludeFromGeneration()
      Specified by:
      getFieldsToExcludeFromGeneration in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateAllMethodInProjection

      public Boolean getGenerateAllMethodInProjection()
      Specified by:
      getGenerateAllMethodInProjection in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getResponseProjectionMaxDepth

      public Integer getResponseProjectionMaxDepth()
      Specified by:
      getResponseProjectionMaxDepth in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGenerateClient

      public Boolean getGenerateClient()
      Specified by:
      getGenerateClient in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getRequestSuffix

      public String getRequestSuffix()
      Specified by:
      getRequestSuffix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getResponseSuffix

      public String getResponseSuffix()
      Specified by:
      getResponseSuffix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getResponseProjectionSuffix

      public String getResponseProjectionSuffix()
      Specified by:
      getResponseProjectionSuffix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getParametrizedInputSuffix

      public String getParametrizedInputSuffix()
      Specified by:
      getParametrizedInputSuffix in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getUseObjectMapperForRequestSerialization

      public Set<String> getUseObjectMapperForRequestSerialization()
      Specified by:
      getUseObjectMapperForRequestSerialization in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getTypesAsInterfaces

      public Set<String> getTypesAsInterfaces()
      Specified by:
      getTypesAsInterfaces in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getResolverArgumentAnnotations

      public Set<String> getResolverArgumentAnnotations()
      Specified by:
      getResolverArgumentAnnotations in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getParametrizedResolverAnnotations

      public Set<String> getParametrizedResolverAnnotations()
      Specified by:
      getParametrizedResolverAnnotations in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getQueryResolverParentInterface

      public String getQueryResolverParentInterface()
      Specified by:
      getQueryResolverParentInterface in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getMutationResolverParentInterface

      public String getMutationResolverParentInterface()
      Specified by:
      getMutationResolverParentInterface in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getSubscriptionResolverParentInterface

      public String getSubscriptionResolverParentInterface()
      Specified by:
      getSubscriptionResolverParentInterface in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getResolverParentInterface

      public String getResolverParentInterface()
      Specified by:
      getResolverParentInterface in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getGeneratedLanguage

      public com.kobylynskyi.graphql.codegen.model.GeneratedLanguage getGeneratedLanguage()
      Specified by:
      getGeneratedLanguage in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • isGenerateModelOpenClasses

      public Boolean isGenerateModelOpenClasses()
      Specified by:
      isGenerateModelOpenClasses in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • isInitializeNullableTypes

      public Boolean isInitializeNullableTypes()
      Specified by:
      isInitializeNullableTypes in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • isGenerateSealedInterfaces

      public Boolean isGenerateSealedInterfaces()
      Specified by:
      isGenerateSealedInterfaces in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • isSupportUnknownFields

      public Boolean isSupportUnknownFields()
      Specified by:
      isSupportUnknownFields in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getUnknownFieldsPropertyName

      public String getUnknownFieldsPropertyName()
      Specified by:
      getUnknownFieldsPropertyName in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • isGenerateNoArgsConstructorOnly

      public Boolean isGenerateNoArgsConstructorOnly()
      Specified by:
      isGenerateNoArgsConstructorOnly in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • isGenerateModelsWithPublicFields

      public Boolean isGenerateModelsWithPublicFields()
      Specified by:
      isGenerateModelsWithPublicFields in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getParentInterfaces

      public ParentInterfacesConfig getParentInterfaces()
    • getConfigurationFiles

      public String[] getConfigurationFiles()
    • getCustomTemplatesRoot

      public File getCustomTemplatesRoot()
      Specified by:
      getCustomTemplatesRoot in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration
    • getCustomTemplates

      public Map<String,String> getCustomTemplates()
      Specified by:
      getCustomTemplates in interface com.kobylynskyi.graphql.codegen.model.GraphQLCodegenConfiguration