@stream supportYou may now use @stream to stream list responses from a compatible server.
To do this, opt in support for the incremental:v0.2 protocol:
val apolloClient = ApolloClient.Builder()
.networkTransport(
HttpNetworkTransport.Builder()
.serverUrl("http://example.com/graphql")
.incrementalDeliveryProtocol(IncrementalDeliveryProtocol.V0_2)
.build()
)
.build()
Using @defer and @stream will stay opt-in until the RFC is merged.
The experimental WebSockets are promoted to stable. In particular, the request url may now be changed in interceptors. This can be used together with RetryStrategy to change the authentication parameters when retrying a subscription. The previous implementation (using the com.apollographql.apollo.ws package name) is now deprecated.
Read more in the migration guide.
You can now use OkHttp cacheUrlOverride() to cache POST requests.
To do so, configure a cache on your OkHttpClient and use enablePostCaching:
val apolloClient = ApolloClient.Builder()
.networkTransport(
HttpNetworkTransport.Builder()
// Enable POST caching
.httpRequestComposer(DefaultHttpRequestComposer(serverUrl = mockServer.url(), enablePostCaching = true))
.httpEngine(
DefaultHttpEngine {
OkHttpClient.Builder()
.cache(directory = File(application.cacheDir, "http_cache"), maxSize = 10_000_000)
.build()
}
)
.build()
)
.build()
The existing apollo-http-cache artifacts have been deprecated. Moving forward, leveraging the cache of existing clients (OkHttp, Ktor, etc...) is the recommended way to do caching at the HTTP layer.
Read more in the migration guide.
The Gradle plugin now works with AGP 9 and the com.android.kotlin.multiplatform.library plugin.
Service.issueSeverity()You may now control the severity of issues found by the compiler in your Gradle scripts:
service("service") {
packageName.set("com.example")
// Do not fail the build on unused fragments
// Valid values are the names of the subclasses of `com.apollographql.apollo.ast.Issue`
issueSeverity("UnusedFragment", "warn")
}
@catch support for responseBased codegen by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6697Service.issueSeverity() by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6731@defer and @stream as of incremental/v0.2 by @BoD in https://github.com/apollographql/apollo-kotlin/pull/6331ApolloRequest.Builder.url(String) by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6758ApolloInterceptor.InsertionPoint to control where the interceptors are added by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6761RetryStrategy by @martinbonnin in https://github.com/apollographql/apollo-kotlin/pull/6764Optional.Absent a data object by @JakeWharton in https://github.com/apollographql/apollo-kotlin/pull/6686if/else to avoid Int boxing by @JakeWharton in https://github.com/apollographql/apollo-kotlin/pull/6688@defer documentation by @calvincestari in https://github.com/apollographql/apollo-kotlin/pull/6751Fetched April 11, 2026