/
Launch Apollo Studio

Kotlin coroutines


The Apollo GraphQL client comes with coroutines support with the following extensions:

suspend fun <T> ApolloCall<T>.await()
fun <T> ApolloSubscriptionCall<T>.toFlow(): Flow<Response<T>>
fun <T> ApolloCall<T>.toFlow()
fun <T> ApolloQueryWatcher<T>.toFlow()
fun <T> ApolloSubscriptionCall<T>.toFlow(): Flow<Response<T>>
fun ApolloPrefetch.toJob(): Job

Including in your project

Add the following dependency:

implementation 'com.apollographql.apollo:apollo-coroutines-support:x.y.z'
Edit on GitHub