Builder

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val CAN_BE_BATCHED: String = "X-APOLLO-CAN-BE-BATCHED"
Link copied to clipboard
@get:Nullable
open val canBeBatched: Boolean
Link copied to clipboard
Link copied to clipboard
@get:Nullable
open val enableAutoPersistedQueries: Boolean
Link copied to clipboard
@get:NotNull
open val executionContext: ExecutionContext
Link copied to clipboard
@get:Nullable
open val httpMethod: HttpMethod
Link copied to clipboard
@get:Nullable
open val sendApqExtensions: Boolean
Link copied to clipboard
@get:Nullable
open val sendDocument: Boolean

Functions

Link copied to clipboard
open fun <T> addCustomScalarAdapter(@NotNull customScalarType: CustomScalarType, @NotNull customScalarAdapter: Adapter<T>): ApolloClient.Builder
Registers the given customScalarAdapter.
Link copied to clipboard
open fun addExecutionContext(@NotNull executionContext: ExecutionContext): ApolloClient.Builder
Link copied to clipboard
open fun addHttpHeader(@NotNull name: String, @NotNull value: String): ApolloClient.Builder
Link copied to clipboard
open fun addHttpInterceptor(@NotNull interceptor: HttpInterceptor): ApolloClient.Builder
Link copied to clipboard
open fun addHttpInterceptors(@NotNull interceptors: List<HttpInterceptor>): ApolloClient.Builder
Link copied to clipboard
Link copied to clipboard
open fun addInterceptors(@NotNull interceptors: List<ApolloInterceptor>): ApolloClient.Builder
Link copied to clipboard
open fun addWsHeader(@NotNull header: HttpHeader): ApolloClient.Builder
Link copied to clipboard
open fun addWsHeaders(@NotNull headers: List<HttpHeader>): ApolloClient.Builder
Link copied to clipboard
open fun autoPersistedQueries(httpMethodForHashedQueries: HttpMethod): ApolloClient.Builder
open fun autoPersistedQueries(httpMethodForHashedQueries: HttpMethod, httpMethodForDocumentQueries: HttpMethod): ApolloClient.Builder
open fun autoPersistedQueries(httpMethodForHashedQueries: HttpMethod, httpMethodForDocumentQueries: HttpMethod, enableByDefault: Boolean): ApolloClient.Builder
Link copied to clipboard
open fun build(): ApolloClient
Link copied to clipboard
open fun callFactory(factory: Call.Factory): ApolloClient.Builder
Set the custom call factory for creating Call instances.
Link copied to clipboard
open fun canBeBatched(@Nullable canBeBatched: Boolean): ApolloClient.Builder
Link copied to clipboard
open fun customScalarAdapters(@NotNull customScalarAdapters: CustomScalarAdapters): ApolloClient.Builder
Link copied to clipboard
The Executor to use for dispatching the requests.
Link copied to clipboard
open fun enableAutoPersistedQueries(@Nullable enableAutoPersistedQueries: Boolean): ApolloClient.Builder
Link copied to clipboard
abstract fun getCanBeBatched(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Nullable
open fun getHttpHeaders(): List<HttpHeader>
Link copied to clipboard
abstract fun getHttpMethod(): HttpMethod
Link copied to clipboard
Link copied to clipboard
abstract fun getSendDocument(): Boolean
Link copied to clipboard
open fun httpBatching(batchIntervalMillis: Long, maxBatchSize: Int, enableByDefault: Boolean): ApolloClient.Builder
Batch HTTP queries to execute multiple at once.
Link copied to clipboard
Link copied to clipboard
open fun httpExposeErrorBody(httpExposeErrorBody: Boolean): ApolloClient.Builder
Link copied to clipboard
open fun httpHeaders(@Nullable list: List<HttpHeader>): ApolloClient.Builder
Link copied to clipboard
open fun httpInterceptors(@NotNull interceptors: List<HttpInterceptor>): ApolloClient.Builder
Link copied to clipboard
open fun httpMethod(@Nullable httpMethod: HttpMethod): ApolloClient.Builder
Link copied to clipboard
open fun httpServerUrl(httpServerUrl: String): ApolloClient.Builder
The url of the GraphQL server used for HTTP.
Link copied to clipboard
open fun interceptors(@NotNull interceptors: List<ApolloInterceptor>): ApolloClient.Builder
Link copied to clipboard
Link copied to clipboard
open fun okHttpClient(okHttpClient: OkHttpClient): ApolloClient.Builder
Set the OkHttpClient to use for making network requests.
Link copied to clipboard
open fun sendApqExtensions(@Nullable sendApqExtensions: Boolean): ApolloClient.Builder
Link copied to clipboard
open fun sendDocument(@Nullable sendDocument: Boolean): ApolloClient.Builder
Link copied to clipboard
open fun serverUrl(serverUrl: String): ApolloClient.Builder
The url of the GraphQL server used for HTTP.
Link copied to clipboard
open fun subscriptionNetworkTransport(subscriptionNetworkTransport: NetworkTransport): ApolloClient.Builder
Link copied to clipboard
open fun webSocketFactory(factory: WebSocket.Factory): ApolloClient.Builder
Set the custom call factory for creating WebSocket instances.
Link copied to clipboard
open fun webSocketServerUrl(webSocketServerUrl: String): ApolloClient.Builder
The url of the GraphQL server used for WebSockets.
Link copied to clipboard
open fun wsHeaders(@NotNull headers: List<HttpHeader>): ApolloClient.Builder
Link copied to clipboard
open fun wsIdleTimeoutMillis(wsIdleTimeoutMillis: Long): ApolloClient.Builder
Link copied to clipboard