aerogear / offix

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

Pagination support for cache updates #542

Closed kingsleyzissou closed 3 years ago

kingsleyzissou commented 4 years ago

Bug Report

Currently we have partially improved cache updates to support a pagination container. For the most part, it works, however, we run into issues when trying to apply optimistic responses.

The issue is that the root query is not saved to the optimistic data. This poses a challenge on how to display optimistic data when the client is offline.

This is a snapshot of the cache for non-paginated queries: prev

And a snapshot of the cache with pagination enabled: current

This is not a trivial fix as the pagination requires filter variables and this query cannot be cached.

kingsleyzissou commented 3 years ago

Closing this since we have decided to deprecate the original Offix packages and move to a client-side datastore.