@wora/apollo-cache
TypeScript icon, indicating that this package has built-in type declarations

2.3.1 • Public • Published

@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);

CacheOptions

Package Sidebar

Install

npm i @wora/apollo-cache

Weekly Downloads

285

Version

2.3.1

License

MIT

Unpacked Size

5.96 kB

Total Files

7

Last publish

Collaborators

  • morrys