This version introduces fluent APIs on operations, more multiplatform targets, more compatibility helpers to ease transition from v2.x, and other fixes.
The API to execute operations now uses the Fluent style, where you can chain method calls together. The ApolloClient query, mutate and subscribe methods now return an ApolloCall that can be configured, and on which you can call execute to execute the operation.
Before:
val request = ApolloRequest.Builder(HeroQuery()).fetchPolicy(FetchPolicy.NetworkOnly).build()
val response = apolloClient.query(request)
After (fluent):
val response = apolloClient.query(HeroQuery())
.fetchPolicy(FetchPolicy.NetworkOnly)
.execute()
If you were using cacheAndNetwork, it's now executeCacheAndNetwork:
// Before
apolloClient.cacheAndNetwork(query)
// After
apolloClient.query(query).executeCacheAndNetwork()
This release adds support for these new targets:
macosArm64iosArm64iosSimulatorArm64watchosArm64watchosSimulatorArm64tvosArm64tvosX64tvosSimulatorArm64Additionally, apollo-api (models) is now compiled for linuxX64. Follow this issue for updates on this - and contributions on this area are welcome!
When using the responseBased codegen, now interfaces will be generated as sealed when possible.
Because sealed interfaces are only available since Kotlin 1.5, a new Gradle option languageVersion has been introduced to control this behavior (and potentially future language features used by the codegen).
To ease transition from 2.x, this release provides:
CustomTypeAdapter that can be used for custom scalars in the same way as in 2.xInput helper that will map to 3.x Optional automaticallyThese helpers are deprecated and are to be used only as a temporary measure - they will be removed in a future version.
Thanks to @davidec-twinlogix, @pauldavies83 @nachtien and @Pitel for their awesome contributions!
Fetched April 11, 2026