Package com.apollographql.apollo
Interface ApolloQueryCall.Builder<T>
-
- All Superinterfaces:
ApolloCall.Builder<T>
- All Known Implementing Classes:
RealApolloCall.Builder
- Enclosing interface:
- ApolloQueryCall<T>
public static interface ApolloQueryCall.Builder<T> extends ApolloCall.Builder<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApolloQueryCall<T>build()ApolloQueryCall.Builder<T>cacheHeaders(com.apollographql.apollo.cache.CacheHeaders cacheHeaders)Sets theCacheHeadersto use for this call.ApolloQueryCall.Builder<T>httpCachePolicy(com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy httpCachePolicy)Sets the http cache policy for response/request cache.ApolloQueryCall.Builder<T>requestHeaders(RequestHeaders requestHeaders)Sets theRequestHeadersto use for this call.ApolloQueryCall.Builder<T>responseFetcher(ResponseFetcher fetcher)Sets theResponseFetcherstrategy for an ApolloCall object.
-
-
-
Method Detail
-
build
@NotNull ApolloQueryCall<T> build()
- Specified by:
buildin interfaceApolloCall.Builder<T>
-
cacheHeaders
@NotNull ApolloQueryCall.Builder<T> cacheHeaders(@NotNull com.apollographql.apollo.cache.CacheHeaders cacheHeaders)
Sets 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>- 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 ApolloQueryCall.Builder<T> httpCachePolicy(@NotNull com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy httpCachePolicy)
Sets the http cache policy for response/request cache.- Parameters:
httpCachePolicy-HttpCachePolicy.Policyto set- Returns:
ApolloQueryCallwith the providedHttpCachePolicy.Policy
-
responseFetcher
@NotNull ApolloQueryCall.Builder<T> responseFetcher(@NotNull ResponseFetcher fetcher)
Sets theResponseFetcherstrategy for an ApolloCall object.- Parameters:
fetcher- theResponseFetcherto use.- Returns:
- The ApolloCall object with the provided CacheControl strategy
-
requestHeaders
@NotNull ApolloQueryCall.Builder<T> requestHeaders(@NotNull RequestHeaders requestHeaders)
Sets 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.- Parameters:
requestHeaders- TheRequestHeadersto use for this request.- Returns:
- The Builder
-
-