aerogear / offix

GraphQL Offline Client and Server
https://offix.dev
Apache License 2.0
758 stars 45 forks source link

Offix network state consumable by users #854

Open wtrocki opened 4 years ago

wtrocki commented 4 years ago

Feature Request

Offline enabled apps sometimes need offline indicators. This is specific to apps we use to give better demos. Currently we have number of offline interfaces:

1) useNetworkStatus hook (tightly coupled with Apollo) and using some home build listeners 2) Offix datastore network - complex and subscription tied solution that might not be easy to expose. 3) Some custom implementation of the network state that we can reuse but they base on 1

We need to come with a strategy to get this organized into something that will be common and reusable even on sample apps.

wtrocki commented 4 years ago

Restoring network state hook in offix datastore will give devleopers ability to understand when their data is replicated + replication events itself.

CC @kingsleyzissou

kingsleyzissou commented 3 years ago

@wtrocki I built a much better hook for OVP that I can possibly put into this package now. Since we don't have to worry about the legacy support any more, this is not as big of an issue. #1070 exposed the network status of the datastore to make that possible.