Version 2.5.10
is a maintenance release with a few bugfixes, mutiny support and a new Gradle register${VariantName}ApolloOperations
task to register your operations to the Apollo registry.
💜 Many thanks to @ProVir, @aoudiamoncef and @jgarrow for their contributions !💜
✨[new] Mutiny support (#3213)
Version 2.5.10
adds support for the Mutiny reactive library.
Add the dependency:
// Mutiny support
implementation 'com.apollographql.apollo:apollo-mutiny-support:x.y.z'
And convert your ApolloCall
to a Mutiny Uni:
// Create a query object
val query = EpisodeHeroNameQuery(episode = Episode.EMPIRE.toInput())
// Directly create Uni with Kotlin extension
val uni = apolloClient.mutinyQuery(query)
Read more in the documentation
✨[new] register${VariantName}ApolloOperations
(#3403)
If you're using Apollo safelisting, you can now upload the transformed operations from Gradle directly. Add a registerOperations {}
block to the apollo {}
block:
apollo {
service("service") {
registerOperations {
// You can get your key from https://studio.apollographql.com/graph/$graph/settings
key.set(System.getenv("APOLLO_KEY"))
graph.set(System.getenv("APOLLO_GRAPH"))
// Use "current" by default or any other graph variant
graphVariant.set("current")
}
}
}
Then call ./gradlew registerMainServiceApolloOperations
to register your operations to the registry. The operations will be registered including the added __typename
fields that might be added during codegen.
👷 All Changes
- refactor: RxJava2/3 support by @aoudiamoncef in #3166
- Remove duplicate ExecutionContext by @martinbonnin in #3213
- feat: add Mutiny support by @aoudiamoncef in #3198
- Updated coroutines for use native-mt version by @ProVir in #3330
- Increase Json nesting to 256 by @martinbonnin in #3334
- Give a hint at errorPayload by @martinbonnin in #3381
- Workaround wrong input field default values by @martinbonnin in #3398
- do not crash when trying to indent the GraphQL document by @martinbonnin in #3399
- Add ./gradlew push${MainService}ApolloOperations by @martinbonnin in #3403
- Operation Registry: normalize queries before computing the hash by @martinbonnin in #3406
New Contributors
- @ProVir made their first contribution in #3330
- @jgarrow made their first contribution in #3346
- @BoD made their first contribution in #3396
Full Changelog: v2.5.9...v2.5.10