You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a sample TodoMVC app with Relay Modern (you can take it a look at: https://rails-relay-todomvc.herokuapp.com/), and is a bit comfused with the force option on RefetchOptions.
What I expected is while using { force: false }, refetching some data that already exists in the Relay Store, for example, switching the filter to "Active" then back to "All" again, will not make a new query request to the server and the cached data will be showed immediately.
RelayModern has pretty aggressive garbage collection. We should document and improve the public caching mechanism, but some more requests than classic are expected. (This is a tradeoff between showing potentially stale data, memory consumption, code complexity, and network requests)
I'm writing a sample TodoMVC app with Relay Modern (you can take it a look at: https://rails-relay-todomvc.herokuapp.com/), and is a bit comfused with the
force
option onRefetchOptions
.What I expected is while using
{ force: false }
, refetching some data that already exists in the Relay Store, for example, switching the filter to "Active" then back to "All" again, will not make a new query request to the server and the cached data will be showed immediately.But in the realworld™ app, Relay fires an request to the server everytime when I do a
refetch
, causing a delay on the UI update. Not sure if I've done something wrong or this is an issue on Relay 😆. The related source code lives at https://github.com/zetavg/RailsRelayTodoMVC/blob/master/app/javascript/packs/todo_app/containers/TodoListItemsWithFilter.js#L24.The text was updated successfully, but these errors were encountered: