Optional delta updates?
I tried to use Graphcool with the current project I am working on but decided against it because it was an offline first app. It would be so much easier to create an offline first experience if we could get only changed data from the database.
Hey, thanks for this suggestion :wave:
Offline support is a topic discussed heavily in the GraphQL ecosystem currently. See this recent article for example: http://www.east5th.co/blog/2017/07/24/offline-graphql-queries-with-redux-offline-and-apollo/
Did you do some research in that direction already, for example with redux-persist?
Using subscriptions is another way to only get updated data from the database, although it would require an active connection though.
We could approach it in the normal database kind of way. Timestamp of last update is sent along with new data from device to the server. All new updates after the time stamp will be sent to the device as a response and merged with persisted data.
The database will need to have a last updated row with the each document for this to work.
The database already has a 'updatedAt' field on each Type. If you keep the value of that field from your last query on the client, you can always filter your query on that field using updatedAt_gt.
This issue has been moved to graphcool/graphcool-framework.