by faizshah · 8y ago · 0 comments
I was hoping to use Apollo on all platforms but it seems I would need to use a custom solution for mobile while on web there's some choices (for offline first): https://github.com/apollographql/apollo-cache-asyncstorage/i...
Currently I'm planning to go with couchdb/couchbase-lite for mobile but I would prefer a graphql solution. I'm also investigating AWS AppSync which appears to have offline support, but I haven't read that deeply into it yet: https://aws.amazon.com/appsync/
I did many attempts to create a graphQL-plugin which streams graphql-data into an the offline-first store. But this is not completely solvable because of the lacking graphQL-streaming-capabilities. The thing is, when the users goes offline for an hour an then online again, there is no way to get the changes of the last hour out of graphQL which means the user then would either have missing updates or has to redownload the full state again. The current streaming-api of graphQL requires a stable connection and is so not useable for offline-first.
If you need something _now_ you are probably better of looking outisde the GraphQL ecosystem though.
You should also consider what your need is. If you need true offline support (ie, you have an app that needs to fully function for days without internet) then that is a very different scenario from just needing to have a bit of data cached for the duration of a subway ride.
In the context of GraphQL I'm talking about a GraphQL client that has offline caching and supports syncing offline mutations. But I could also use something like pouch+couch: https://blog.couchbase.com/introduction-offline-data-storage...