use of com.apollographql.apollo.api.cache.http.HttpCachePolicy in project apollo-android by apollographql.
the class RealApolloCall method prepareInterceptorChain.
private ApolloInterceptorChain prepareInterceptorChain(Operation operation) {
List<ApolloInterceptor> interceptors = new ArrayList<>();
HttpCachePolicy.Policy httpCachePolicy = operation instanceof Query ? this.httpCachePolicy : null;
ResponseFieldMapper responseFieldMapper = responseFieldMapperFactory.create(operation);
interceptors.addAll(applicationInterceptors);
interceptors.add(responseFetcher.provideInterceptor(logger));
interceptors.add(new ApolloCacheInterceptor(apolloStore, responseFieldMapper, dispatcher, logger));
interceptors.add(new ApolloParseInterceptor(httpCache, apolloStore.networkResponseNormalizer(), responseFieldMapper, scalarTypeAdapters, logger));
interceptors.add(new ApolloServerInterceptor(serverUrl, httpCallFactory, httpCachePolicy, false, scalarTypeAdapters, logger, sendOperationdIdentifiers));
return new RealApolloInterceptorChain(interceptors);
}
Aggregations