-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to achieve offline support? #11
Comments
Hey, @jbaxleyiii, you've marked apollographql/apollo-client#2460 as "high-priority". Is there any progress on this? |
Related apollographql/apollo-link#125 |
Good answer to the question what offline support means: apollographql/apollo-client#424 (comment) . Next answers provide some examples of syncing DBs like PouchDB/CouchDB and minimongo/MongoDB in Meteor. Other syncing solutions: prisma/prisma1#1659 (comment) and https://github.com/orbitjs/orbit |
Here's a comment I wrote about how you can cobble together pretty decent offline support with packages that are already available today: https://github.com/benseitz/apollo-link-offline/issues/1#issuecomment-371678922 |
From @chrisfosterelli / https://github.com/benseitz/apollo-link-offline/issues/1#issuecomment-436421802
|
We are working on this lib to get granular offline support (still wip): |
Hi everyone, https://github.com/morrys/wora/tree/master/packages/apollo-offline https://github.com/morrys/wora/tree/master/packages/apollo-cache They are projects born by extracting the logics of the offline support from: https://github.com/morrys/react-relay-offline You can find a first example project here: https://github.com/morrys/offline-examples A very important feature is the integration of the offline engine within the client logic and not at the network level. Your opinions on both libraries are welcome. For more information contact me on twitter: https://twitter.com/m0rrys Thank you, |
The alternative will be to use https://github.com/aerogear/offix/ It supports offline persistence, subscriptions, data encryption and conflict resolution. |
@wtrocki |
|
I think that's not fully accurate: aerogear/offix#543 (comment) |
TL;DR - Offix got feedback from the community that:
We are doing an offline database solution rather than just adding an offline layer on top of the Apollo. Status of offline support for ApolloThere are 4 levels of offline support right now
Supported by Apollo. CacheRedirects giving developers some form of customization for advanced use cases
Offline without write access - supported by Apollo Community (good work from @wodCZ who recently fixed dozens of bugs)
Wora library done by @morrys seems to be the most popular choice. Challenges of those solutions
This one uses GraphQL as transport and uses an offline database (think Firebase, AppSync, etc.) The benefits of those is that you can use Apollo client on level 1 and enable database only for the elements of the system that really needs to be fully offline etc. This approach was proven to be successful for folks that wanted to have a flexible and stable solution. Initially, we build this on the backend using our own implementation: https://graphback.dev/docs/datasync/intro but we are also investigating using Apache Kafka I hope that at some point the Apollo team would take over and offer level 2 along with level 1 as this is the most requested feature IMHO. |
After playing for couple of month with Apollo trying to achieve an offline first app I decided to drop it as I was facing more and more challenge every day while having a very fragile and gigantic code base just to deal with it. This one is probably on me tho, I should have understand better what is apollo designed for before picking it. I completely switched to rxjs and I was able to reduce my code base by about 60% for the same features. @wtrocki I wish you the best with your new offix and I will certainly follow your work. Offline world is truly a challenging one. |
Hi all - we're going to be looking into this in the not too distant future. We'll be tracking this work in #371. Please join in the discussion over there if you're still interested in this functionality. Thanks! |
Migrated from: apollographql/apollo-client#424
and
Migrated from: apollographql/apollo-client#2460
and
apollographql/apollo-client#307
Please vote with 👍, if this feature request important for you.
The text was updated successfully, but these errors were encountered: