Skip to content

Releases: kobylynskyi/graphql-java-codegen

4.1.0

04 Jan 02:08
Compare
Choose a tag to compare

  • Kotlin support (via generatedLanguage = KOTLIN)
  • Scala support (via generatedLanguage = SCALA)

Kudos to @jxnu-liguobin for Kotlin and Scala support!

4.0.1

10 Dec 03:03
Compare
Choose a tag to compare
  • Fix GraphQLRequest serialization with null input #412 #413
  • Consider a case when both Optional & apiReturnType is used #410 #414
  • Consider primitive types in ParametrizedInput classes #421 #423
  • Scala: Refactor toString() and equals(), add examples #406 #411
  • Scala: Optimizations and reformatting of generated classes #416 #417
  • Refactor the library for multi-language support #407 #418
  • Bump jackson-databind from 2.11.3 to 2.12.0 #409

4.0.0

27 Nov 02:47
Compare
Choose a tag to compare

New features and bugfixes

  • Support Scala code generation #401 #402
    • Via a new codegen config: generatedLanguage (for now accepts only JAVA and SCALA. More JVM languages might be supported in the future)
  • Support multiple queries in a single request #340 #350
    • Example can be found here
  • Generate primitive types for non-null GraphQL types #305 #386
    • Breaking change. Migration is described below.
  • Introduce config for specifying custom-serializable fields #260 #392
    • Now it is possible to specify a list of fields that should be serialized in the way you want. Example
  • Ability to skip "throws Exception" in api method signature #339 #375
    • Via a new codegen config: generateApisWithThrowsException (by default = true)
  • Maven plugin: Support parallel builds #325 #376
  • Maven plugin: fix parameters parsing: customAnnotationsMapping/directiveAnnotationsMapping #389 #391

Breaking changes

This release has the following breaking change:

  • Generate primitive types for non-null GraphQL types #305 #386
    • Follow migration guide to update your GraphQLResolver implementation classes.

3.1.1

30 Sep 22:09
Compare
Choose a tag to compare
  • Tweaked project dependencies for Maven plugin to avoid CVSS SNYK-JAVA #326 #329 by @jtwing62173
  • Generate parametrized input class for interfaces #327 #330

3.1.0

04 Sep 13:21
Compare
Choose a tag to compare
  • Relay support (introduced new config) #295 #304
  • Support code generation based on introspection query response #165 #297
  • Ability to specify fieldsWithResolvers via directives #296 #299
  • Ability to select "all" in client response projection #300 #302
  • Add suffix after the default value of the base type (long) #292

3.0.0

15 Aug 23:03
Compare
Choose a tag to compare

New features and bugfixes

  • Support multiple annotations #248 #273
    • Affects customAnnotationsMapping and directiveAnnotationsMapping
  • Support for Optional when returning nullable types #269 #274
    • Introduced new config: useOptionalForNullableReturnTypes. See codegen options. Also removed generateAsyncApi and renamed apiAsyncReturnType/apiAsyncReturnListType.
  • Ability to generate only root interface with all APIs #270 #275
  • Support descriptions in Javadoc rather than comments #267 #268
    • Taking into account GraphQL descriptions when generating classes with Javadoc. If the description for GraphQL type is not provided, then fetch GraphQL comments.
  • Fix request serialization if null input was supplied #271 #272

Migration guide

Breaking changes

This release has the following breaking changes:

  • Remove generateAsyncApi #269 #274
  • Rename apiAsyncReturnType -> apiReturnType #269 #274
  • Rename apiAsyncReturnListType -> apiReturnListType #269 #274
  • Change type of customAnnotationsMapping: Map<String, String> -> Map<String, String[]> #248 #273
  • Change type of directiveAnnotationsMapping: Map<String, String> -> Map<String, String[]> #248 #273

2.4.1

26 Jul 19:17
Compare
Choose a tag to compare
  • Handle java reserved words in enum #249 #250

2.4.0

22 Jul 19:11
Compare
Choose a tag to compare
  • Support mapping of GraphQL directives to annotations #241 #246
  • Possibility to add __typename to response projection of GraphQL types #245 #247
  • Handle preceding "@" in customAnnotationsMapping, directiveAnnotationsMapping and modelValidationAnnotation #239 #240

2.3.0

19 Jul 16:06
Compare
Choose a tag to compare
  • Possibility to add __typename to response projection of GraphQL interfaces #230 #233 #229
  • Support custom types for async Query/Mutation generation #228 #236 #229
  • Support custom class-level annotations via customAnnotationsMapping #231 #234
  • Handle java-reserved names in client generated classes #237 #238

2.2.1

14 Jul 14:40
Compare
Choose a tag to compare

Note: If you are migrating from version 1.x.x, please follow Migration Guide