I am looking at Relay / GraphQL. Looks great to use with React but my main concern is whether it is possible to use GraphQL in an offline mode. In my Hybrid app built currently using Ionic Framework (AngularJs based), am planning to shift out to React, Redux. In terms of fetching data from server, Relay / GraphQL look great but how would I run a GraphQL instance locally on mobile when the user is offline? Is this a valid use case for Relay / GraphQL. As of today, i use PouchDB as my local database.
There was only one update about offline in Blogpost 2015-08-11
https://facebook.github.io/react/blog/2015/08/11/relay-technical-preview.html
What's Next:
Offline support. This will allow applications to fulfill queries and enqueue updates without connectivity
I would use WebSocket to check if online and show some kind of notification when offline. Just don't execute queries while offline.. Or if you want better UX, try to make abstraction layer to save most recent data + mutations and push update to server when connection is established.
React Conf will be 2016-June https://www.react-europe.org/ I think they will make it before that date and announce during conf or before, but it's just my personal opinion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With