This version, amongst other things, contains RxJava3 support, a new way to register ApolloInterceptor with factories and makes it easier to download your schema.json from the command line. Starting with this version, releases are published on Maven Central in addition to Jcenter.
Version 2.2.0 includes support for RxJava3. To use it, add the dependency to your Gradle file:
// RxJava3 support
implementation("com.apollographql.apollo:apollo-rx3-support:x.y.z")
The dependency contains static and extension methods to convert ApolloCall, ApolloSubscriptionCall, etc... to their RxJava3 counterparts.
For an exemple, to convert an ApolloCall to an Observable:
Java:
// Create a query object
EpisodeHeroName query = EpisodeHeroName.builder().episode(Episode.EMPIRE).build();
// Create an ApolloCall object
ApolloCall<EpisodeHeroName.Data> apolloCall = apolloClient.query(query);
// RxJava3 Observable
Observable<Response<EpisodeHeroName.Data>> observable3 = Rx3Apollo.from(apolloCall);
Kotlin:
// Create a query object
val query = EpisodeHeroNameQuery(episode = Episode.EMPIRE.toInput())
// Directly create Observable with Kotlin extension
val observable = apolloClient.rxQuery(query)
You can read more in the dedicated section of the documentation.
ApolloInterceptors added with ApolloClient.applicationInterceptor() were only created once for the lifetime of the ApolloClient so the same interceptor was always disposed. If you need your interceptor to start with a new state for each call, you can use ApolloInterceptorFactory that will create a new interceptor for each new call.
Using the downloadApolloSchema task from the command line is now easier:
# Instead of using properties:
./gradlew downloadApolloSchema -Pcom.apollographql.apollo.endpoint=https://your.graphql.endpoint \
-Pcom.apollographql.apollo.schema=src/main/graphql/com/example/schema.json
# You can now use `--endpoint` and `--schema`:
./gradlew downloadApolloSchema --endpoint=https://your.graphql.endpoint --schema=app/src/main/graphql/com/example/schema.json
Fetched April 11, 2026