Builder
A Builder used to create instances of ApolloClient
Constructors
Functions
Registers the given customScalarAdapter
Adds httpInterceptor to the list of HTTP interceptors
Configures auto persisted queries.
Creates an ApolloClient from this Builder
Changes the CoroutineDispatcher used for I/O intensive work like reading the network or the cache On the JVM the dispatcher is kotlinx.coroutines.Dispatchers.IO by default. On native this function has no effect. Network request use the default NSURLConnection threads and the cache uses a background dispatch queue.
Batch HTTP queries to execute multiple at once. This reduces the number of HTTP round trips at the price of increased latency as every request in the batch is now as slow as the slowest one. Some servers might have a per-HTTP-call cache making it faster to resolve 1 big array of n queries compared to resolving the n queries separately.
The HttpEngine to use for HTTP requests
Configures whether to expose the error body in ApolloHttpException.
The url of the GraphQL server used for HTTP
The url of the GraphQL server used for HTTP
The WebSocketEngine to use for WebSocket requests
The timeout after which an inactive WebSocket will be closed
Configure the WebSocketNetworkTransport to reopen the websocket automatically when a network error happens
The url of the GraphQL server used for WebSockets Use this function or webSocketServerUrl((suspend () -> String)) but not both.
Configure dynamically the url of the GraphQL server used for WebSockets. Use this function or webSocketServerUrl(String) but not both.
The WsProtocol.Factory to use for websockets
Properties
Extensions
Configures the ApolloClient to use the callFactory for network requests.
Configures the ApolloClient to use the OkHttpClient for network requests. The OkHttpClient will be used for both HTTP and WebSocket requests.