use of com.apollographql.apollo.IdFieldCacheKeyResolver in project apollo-android by apollographql.
the class BaseFetcherTest method setUp.
@Before
public void setUp() {
server = new MockWebServer();
OkHttpClient okHttpClient = new OkHttpClient.Builder().writeTimeout(2, TimeUnit.SECONDS).readTimeout(2, TimeUnit.SECONDS).dispatcher(new Dispatcher(Utils.immediateExecutorService())).build();
apolloClient = ApolloClient.builder().serverUrl(server.url("/")).okHttpClient(okHttpClient).normalizedCache(new LruNormalizedCacheFactory(EvictionPolicy.NO_EVICTION), new IdFieldCacheKeyResolver()).dispatcher(Utils.immediateExecutor()).build();
}
use of com.apollographql.apollo.IdFieldCacheKeyResolver in project apollo-android by apollographql.
the class QueryRefetchTest method setUp.
@Before
public void setUp() throws IOException {
server = new MockWebServer();
server.start();
OkHttpClient okHttpClient = new OkHttpClient.Builder().dispatcher(new Dispatcher(Utils.immediateExecutorService())).build();
apolloClient = ApolloClient.builder().serverUrl(server.url("/")).dispatcher(Utils.immediateExecutor()).okHttpClient(okHttpClient).normalizedCache(new LruNormalizedCacheFactory(EvictionPolicy.NO_EVICTION), new IdFieldCacheKeyResolver()).build();
}
Aggregations