Class RealApolloCall.Builder<T>
- java.lang.Object
-
- com.apollographql.apollo.internal.RealApolloCall.Builder<T>
-
- All Implemented Interfaces:
ApolloCall.Builder<T>,ApolloMutationCall.Builder<T>,ApolloQueryCall.Builder<T>
- Enclosing class:
- RealApolloCall<T>
public static final class RealApolloCall.Builder<T> extends java.lang.Object implements ApolloQueryCall.Builder<T>, ApolloMutationCall.Builder<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RealApolloCall.Builder<T>apolloStore(com.apollographql.apollo.cache.normalized.ApolloStore apolloStore)RealApolloCall.Builder<T>applicationInterceptorFactories(java.util.List<com.apollographql.apollo.interceptor.ApolloInterceptorFactory> applicationInterceptorFactories)RealApolloCall.Builder<T>applicationInterceptors(java.util.List<ApolloInterceptor> applicationInterceptors)RealApolloCall.Builder<T>autoPersistedOperationsInterceptorFactory(com.apollographql.apollo.interceptor.ApolloInterceptorFactory interceptorFactory)RealApolloCall<T>build()RealApolloCall.Builder<T>cacheHeaders(com.apollographql.apollo.cache.CacheHeaders cacheHeaders)Sets theCacheHeadersto use for this call.RealApolloCall.Builder<T>dispatcher(java.util.concurrent.Executor dispatcher)RealApolloCall.Builder<T>enableAutoPersistedQueries(boolean enableAutoPersistedQueries)RealApolloCall.Builder<T>httpCache(com.apollographql.apollo.api.cache.http.HttpCache httpCache)RealApolloCall.Builder<T>httpCachePolicy(com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy httpCachePolicy)Sets the http cache policy for response/request cache.RealApolloCall.Builder<T>httpCallFactory(okhttp3.Call.Factory httpCallFactory)RealApolloCall.Builder<T>logger(com.apollographql.apollo.api.internal.ApolloLogger logger)RealApolloCall.Builder<T>operation(com.apollographql.apollo.api.Operation operation)RealApolloCall.Builder<T>optimisticUpdates(com.apollographql.apollo.api.internal.Optional<com.apollographql.apollo.api.Operation.Data> optimisticUpdates)RealApolloCall.Builder<T>refetchQueries(java.util.List<com.apollographql.apollo.api.Query> refetchQueries)Sets a list ofQueryto be re-fetched once this mutation completed.RealApolloCall.Builder<T>refetchQueryNames(java.util.List<com.apollographql.apollo.api.OperationName> refetchQueryNames)Sets a list ofApolloQueryWatcherquery names to be re-fetched once this mutation completed.RealApolloCall.Builder<T>requestHeaders(RequestHeaders requestHeaders)Sets theRequestHeadersto use for this call.RealApolloCall.Builder<T>responseFetcher(ResponseFetcher responseFetcher)Sets theResponseFetcherstrategy for an ApolloCall object.RealApolloCall.Builder<T>responseFieldMapperFactory(ResponseFieldMapperFactory responseFieldMapperFactory)Deprecated.The mapper factory is no longer used and will be removed in the future.RealApolloCall.Builder<T>scalarTypeAdapters(com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters)RealApolloCall.Builder<T>serverUrl(okhttp3.HttpUrl serverUrl)RealApolloCall.Builder<T>tracker(ApolloCallTracker tracker)RealApolloCall.Builder<T>useHttpGetMethodForPersistedQueries(boolean useHttpGetMethodForPersistedQueries)RealApolloCall.Builder<T>useHttpGetMethodForQueries(boolean useHttpGetMethodForQueries)RealApolloCall.Builder<T>writeToNormalizedCacheAsynchronously(boolean writeToNormalizedCacheAsynchronously)
-
-
-
Method Detail
-
operation
public RealApolloCall.Builder<T> operation(com.apollographql.apollo.api.Operation operation)
-
serverUrl
public RealApolloCall.Builder<T> serverUrl(okhttp3.HttpUrl serverUrl)
-
httpCallFactory
public RealApolloCall.Builder<T> httpCallFactory(okhttp3.Call.Factory httpCallFactory)
-
httpCache
public RealApolloCall.Builder<T> httpCache(com.apollographql.apollo.api.cache.http.HttpCache httpCache)
-
responseFieldMapperFactory
@Deprecated public RealApolloCall.Builder<T> responseFieldMapperFactory(ResponseFieldMapperFactory responseFieldMapperFactory)
Deprecated.The mapper factory is no longer used and will be removed in the future.
-
scalarTypeAdapters
public RealApolloCall.Builder<T> scalarTypeAdapters(com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters)
-
apolloStore
public RealApolloCall.Builder<T> apolloStore(com.apollographql.apollo.cache.normalized.ApolloStore apolloStore)
-
cacheHeaders
@NotNull public RealApolloCall.Builder<T> cacheHeaders(@NotNull com.apollographql.apollo.cache.CacheHeaders cacheHeaders)
Description copied from interface:ApolloQueryCall.BuilderSets theCacheHeadersto use for this call.com.apollographql.apollo.interceptor.FetchOptionswill be configured with this headers, and will be accessible from theResponseFetcherused for this call.- Specified by:
cacheHeadersin interfaceApolloCall.Builder<T>- Specified by:
cacheHeadersin interfaceApolloMutationCall.Builder<T>- Specified by:
cacheHeadersin interfaceApolloQueryCall.Builder<T>- Parameters:
cacheHeaders- theCacheHeadersthat will be passed with records generated from this request toNormalizedCache. Standardized cache headers are defined inApolloCacheHeaders.- Returns:
- The ApolloCall object with the provided
CacheHeaders.
-
httpCachePolicy
@NotNull public RealApolloCall.Builder<T> httpCachePolicy(@NotNull com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy httpCachePolicy)
Description copied from interface:ApolloQueryCall.BuilderSets the http cache policy for response/request cache.- Specified by:
httpCachePolicyin interfaceApolloQueryCall.Builder<T>- Parameters:
httpCachePolicy-HttpCachePolicy.Policyto set- Returns:
ApolloQueryCallwith the providedHttpCachePolicy.Policy
-
responseFetcher
@NotNull public RealApolloCall.Builder<T> responseFetcher(@NotNull ResponseFetcher responseFetcher)
Description copied from interface:ApolloQueryCall.BuilderSets theResponseFetcherstrategy for an ApolloCall object.- Specified by:
responseFetcherin interfaceApolloQueryCall.Builder<T>- Parameters:
responseFetcher- theResponseFetcherto use.- Returns:
- The ApolloCall object with the provided CacheControl strategy
-
requestHeaders
@NotNull public RealApolloCall.Builder<T> requestHeaders(@NotNull RequestHeaders requestHeaders)
Description copied from interface:ApolloQueryCall.BuilderSets theRequestHeadersto use for this call. These headers will be added to the HTTP request when it is issued. These headers will be applied after any headers applied by application-level interceptors and will override those if necessary.- Specified by:
requestHeadersin interfaceApolloMutationCall.Builder<T>- Specified by:
requestHeadersin interfaceApolloQueryCall.Builder<T>- Parameters:
requestHeaders- TheRequestHeadersto use for this request.- Returns:
- The Builder
-
refetchQueryNames
@NotNull public RealApolloCall.Builder<T> refetchQueryNames(@NotNull java.util.List<com.apollographql.apollo.api.OperationName> refetchQueryNames)
Description copied from interface:ApolloMutationCall.BuilderSets a list of
ApolloQueryWatcherquery names to be re-fetched once this mutation completed.- Specified by:
refetchQueryNamesin interfaceApolloMutationCall.Builder<T>- Parameters:
refetchQueryNames- array ofOperationNamequery names to be re-fetched- Returns:
- The Builder
-
refetchQueries
@NotNull public RealApolloCall.Builder<T> refetchQueries(@NotNull java.util.List<com.apollographql.apollo.api.Query> refetchQueries)
Description copied from interface:ApolloMutationCall.BuilderSets a list of
Queryto be re-fetched once this mutation completed.- Specified by:
refetchQueriesin interfaceApolloMutationCall.Builder<T>- Parameters:
refetchQueries- array ofQueryto be re-fetched- Returns:
- The Builder
-
dispatcher
public RealApolloCall.Builder<T> dispatcher(java.util.concurrent.Executor dispatcher)
-
logger
public RealApolloCall.Builder<T> logger(com.apollographql.apollo.api.internal.ApolloLogger logger)
-
tracker
public RealApolloCall.Builder<T> tracker(ApolloCallTracker tracker)
-
applicationInterceptors
public RealApolloCall.Builder<T> applicationInterceptors(java.util.List<ApolloInterceptor> applicationInterceptors)
-
applicationInterceptorFactories
public RealApolloCall.Builder<T> applicationInterceptorFactories(java.util.List<com.apollographql.apollo.interceptor.ApolloInterceptorFactory> applicationInterceptorFactories)
-
autoPersistedOperationsInterceptorFactory
public RealApolloCall.Builder<T> autoPersistedOperationsInterceptorFactory(com.apollographql.apollo.interceptor.ApolloInterceptorFactory interceptorFactory)
-
enableAutoPersistedQueries
public RealApolloCall.Builder<T> enableAutoPersistedQueries(boolean enableAutoPersistedQueries)
-
optimisticUpdates
public RealApolloCall.Builder<T> optimisticUpdates(com.apollographql.apollo.api.internal.Optional<com.apollographql.apollo.api.Operation.Data> optimisticUpdates)
-
useHttpGetMethodForQueries
public RealApolloCall.Builder<T> useHttpGetMethodForQueries(boolean useHttpGetMethodForQueries)
-
useHttpGetMethodForPersistedQueries
public RealApolloCall.Builder<T> useHttpGetMethodForPersistedQueries(boolean useHttpGetMethodForPersistedQueries)
-
writeToNormalizedCacheAsynchronously
public RealApolloCall.Builder<T> writeToNormalizedCacheAsynchronously(boolean writeToNormalizedCacheAsynchronously)
-
build
@NotNull public RealApolloCall<T> build()
- Specified by:
buildin interfaceApolloCall.Builder<T>- Specified by:
buildin interfaceApolloMutationCall.Builder<T>- Specified by:
buildin interfaceApolloQueryCall.Builder<T>
-
-