@wora/apollo-cache
v2.3.1
Published
@wora Apollo Cache
Downloads
1,003
Maintainers
Readme
@wora/apollo-cache
Installation
Install @wora/apollo-cache using yarn or npm:
yarn add @wora/apollo-cache
Examples
import ApolloCache from '@wora/apollo-cache';
const cache = new ApolloCache({...});
// await before instantiating ApolloClient, else queries might run before the cache is persisted
await cache.hydrated();
// Continue setting up Apollo as usual.
const client = new ApolloClient({
cache,
...
});
Options
- constructor(options?: InMemoryCacheConfig, persistOptions?:CacheOptions);