ApolloClient

class ApolloClient : ExecutionOptions, Closeable

The main entry point for the Apollo runtime. An ApolloClient is responsible for executing queries, mutations and subscriptions

Types

Link copied to clipboard
class Builder : MutableExecutionOptions<ApolloClient.Builder>

A Builder used to create instances of ApolloClient

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun dispose()
Link copied to clipboard
fun <D : Operation.Data> executeAsFlow(apolloRequest: ApolloRequest<D>): Flow<ApolloResponse<D>>

Low level API to execute the given apolloRequest and return a Flow.

Link copied to clipboard
fun <D : Mutation.Data> mutate(mutation: Mutation<D>): ApolloCall<D>
Link copied to clipboard
fun <D : Mutation.Data> mutation(mutation: Mutation<D>): ApolloCall<D>

Creates a new ApolloCall that you can customize and/or execute.

Link copied to clipboard
fun newBuilder(): ApolloClient.Builder
Link copied to clipboard
fun <D : Operation.Data> prefetch(operation: Operation<D>): Nothing
Link copied to clipboard
fun <D : Query.Data> query(query: Query<D>): ApolloCall<D>

Creates a new ApolloCall that you can customize and/or execute.

Link copied to clipboard
fun <D : Subscription.Data> subscribe(subscription: Subscription<D>): ApolloCall<D>
Link copied to clipboard
fun <D : Subscription.Data> subscription(subscription: Subscription<D>): ApolloCall<D>

Creates a new ApolloCall that you can customize and/or execute.

Properties

Link copied to clipboard
open override val canBeBatched: Boolean?
Link copied to clipboard
val customScalarAdapters: CustomScalarAdapters
Link copied to clipboard
open override val enableAutoPersistedQueries: Boolean?
Link copied to clipboard
open override val executionContext: ExecutionContext
Link copied to clipboard
open override val httpHeaders: List<HttpHeader>?
Link copied to clipboard
open override val httpMethod: HttpMethod?
Link copied to clipboard
val interceptors: List<ApolloInterceptor>
Link copied to clipboard
val networkTransport: NetworkTransport
Link copied to clipboard
open override val sendApqExtensions: Boolean?
Link copied to clipboard
open override val sendDocument: Boolean?
Link copied to clipboard
val subscriptionNetworkTransport: NetworkTransport