Offix-Android is a project that helps the developers to extend capabilities of Apollo GraphQL by providing fully-featured offline Workflow and Conflict Resolution for Android Platform. Developers can:-
- Perform queries and mutations when offline and these would be automatically synced to the server when they come online.
- Provide their custom conflict resolution strategies (i.e their own business logic) to resolve conflicts among the data.
It also enables working with locally cached GraphQL compliant data without access to the server. It will leverage the capabilities of Apollo GraphQL cache do deliver a seamless experience for querying data even when server-side data is not reachable.
The Mutations are persisted in an Offline Store when the network connection is lost and replicated back to the server when the user comes back online again. The cache gets updated after the response is successfully received from the server. Upon querying, data is retrieved from the cache and then can be used by the developers to perform UI Bindings accordingly.
Developers can provide custom conflict resolution strategies, i.e their own business logic to solve conflicts among the mutations and then replicate them back to the server after resolving conflicts.
- Adding Offline Support when the app is in background.
- Provide UI bindings in the app. (For the time being, you can use subscriptions as shown in the sample app to have UI bindings.)
1. GSoC Project
6. Presentation
7. Blogs
I am extremely thankful to my mentors, Harshit Dwivedi (@harshithdwivedi) and Wojtek Trocki (@wtrocki) for their constant guidance and motivation. And also a big thanks to the JBoss and the Aerogear community members for their support throughout the GSoC phase.