com.apollographql.apollo3.rx3.Rx3Apollo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-rx3-support Show documentation
Show all versions of apollo-rx3-support Show documentation
Apollo GraphQL RxJava3 bindings
The newest version!
/*
* This file is auto generated from apollo-rx2-support by rxjava3.main.kts, do not edit manually.
*/
package com.apollographql.apollo3.rx3
import com.apollographql.apollo3.ApolloCall
import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
import com.apollographql.apollo3.api.ApolloResponse
import com.apollographql.apollo3.api.Operation
import io.reactivex.rxjava3.annotations.CheckReturnValue
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.core.Scheduler
import io.reactivex.rxjava3.core.Single
import io.reactivex.rxjava3.schedulers.Schedulers
import kotlinx.coroutines.rx3.asCoroutineDispatcher
import kotlinx.coroutines.rx3.asFlowable
class Rx3Apollo private constructor() {
init {
throw AssertionError("This class cannot be instantiated")
}
companion object {
@JvmStatic
@CheckReturnValue
@JvmOverloads
@Deprecated("use kotlinx-coroutines-rx3 directly", ReplaceWith("call.toFlow().asFlowable(scheduler.asCoroutineDispatcher())"), level = DeprecationLevel.ERROR)
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
fun flowable(call: ApolloCall, scheduler: Scheduler = Schedulers.io()): Flowable> {
return call.toFlow().asFlowable(scheduler.asCoroutineDispatcher())
}
@JvmStatic
@CheckReturnValue
@JvmOverloads
@Deprecated("use kotlinx-coroutines-rx3 directly", ReplaceWith("call.toFlow().asFlowable(scheduler.asCoroutineDispatcher()).firstOrError()"), level = DeprecationLevel.ERROR)
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
fun single(call: ApolloCall, scheduler: Scheduler = Schedulers.io()): Single> {
return call.toFlow().asFlowable(scheduler.asCoroutineDispatcher()).firstOrError()
}
}
}