Skip to content

kiwigrid/graphql-java-codegen

 
 

Repository files navigation

GraphQL Codegen

CircleCI Codecov License: MIT

Plugins

Please refer to:

Supported Options

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.

Inspired by

swagger-codegen

About

Make your GraphQL Java application schema-driven!

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.1%
  • FreeMarker 3.9%