Apollo-client: Offline Support for Version 2?

Created on 2 Nov 2017  路  9Comments  路  Source: apollographql/apollo-client

Based on the apollo client v2 redux has been deprecated as the default store

any ideas how to do offline support for apollo client?

馃毃 high-priority

Most helpful comment

All 9 comments

Is there is any way to configure apollo client with redux ?

This has been discussed across a couple of other issues here and in apollo-link, notably https://github.com/apollographql/apollo-link/issues/125. I think there's some good momentum to get an offline cache solution going for Apollo 2 and I believe @danieljvdm may be opening a PR. I think other features like queueing requests are probably more suited to an apollo-link alternative or middleware/afterware.

@stubailo @helfer Would a PR adding offline cacheing with something like LocalForage to apollo-cache-inmemory be a welcome feature?

@ralphchristianeclipse we definitely want to have great offline support! Its one of the big reasons for the new architecture of the 2.0 馃帀

That issue that @2WheelCoder is a great starting point, but we can also have a discussion around features here for everyone to chime in (this repo has higher traffic)

@2WheelCoder I'd prefer that any offline tooling work across cache implementations so maybe it is a wrapper around the Cache API so that other implementations can benefit from it?

@jbaxleyiii I think in order for offline to work across cache implementations we need a cache listener (to know when the store updates, in order to persist) on the top level api. Do you agree with this? If so I can probably get started on a PR for that.

馃憤+1 on this.

This is stopping me from migrating my app to use GraphQL on the client. I still rely heavily on Redux Persist to ensure I have access to my data offline. +1 for this.

馃憤 +1

To help provide a more clear separation between feature requests / discussions and bugs, and to help clean up the feature request / discussion backlog, Apollo Client feature requests / discussions are now being managed under the https://github.com/apollographql/apollo-feature-requests repository.

Migrated to: https://github.com/apollographql/apollo-feature-requests/issues/11

Was this page helpful?
0 / 5 - 0 ratings