Description
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.
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.