TallerWebSolutions / apollo-cache-instorage

Apollo Cache implementation that facilitates locally storing resources
MIT License
96 stars 11 forks source link

nextjs integration #11

Open tafelito opened 4 years ago

tafelito commented 4 years ago

Since the InStorageCache requires a storage compatible with WebStorage, how would integrate this with nextjs?

doing this won't work

const cache = new InStorageCache({
    storage: isServer() ? <???> : window.localStorage,
    addPersistField: true,
    shouldPersist: PersistLink.shouldPersist,
  }).restore(initialState);