github apollographql/apollo-kotlin v2.4.4

latest releases: v4.0.0, v4.0.0-rc.2, v3.8.5...
3 years ago

Version 2.4.4 is a hotfix release to disable using Kotlin parameters default values to represent GraphQL variables default values (#2741). This is not needed as the server can infer the variable default value from the query document and created a bunch of other issues (#2744 and #2742) in addition to sending uneeded variables alongside the query.

query GetHero($myBool: Boolean = true) { ... }

will now correctly generate

// no variable will be sent alongside the query by default
// and the server will read the default value from the GraphQL query document
data class GetHero(val myBool: Input<Boolean> = Input.absent())

This bug was introduced in version 2.4.2. If you're using GraphQL queries with variables default values, please upgrade to 2.4.4.

#2741 also fixes a crash in the handling of @include directives using variables default values in a much less invasive way. Many thanks to @DSteve595 for investigating this and pointing to the correct solution.

Changes:

  • [Codegen] Revert default values as Kotlin default parameters and made skipField more robust (#2741)

Don't miss a new apollo-kotlin release

NewReleases is sending notifications on new releases.