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
The query runs on the first time successfully, but on the second query, we get an error. This currently results in result.data getting set to undefined (if it's a network error) after the second query.
How can we still display the data cached by the previous query when an error occurs in a subsequent query?
I guess I could use the offline exchange, but that requires switching to Graphcache and doesn't cover the situation where we get a non-network error.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say I have a page with a todo list that polls the list every 2s so that the list is always fresh:
The query runs on the first time successfully, but on the second query, we get an error. This currently results in
result.data
getting set toundefined
(if it's a network error) after the second query.How can we still display the data cached by the previous query when an error occurs in a subsequent query?
I guess I could use the offline exchange, but that requires switching to Graphcache and doesn't cover the situation where we get a non-network error.
Beta Was this translation helpful? Give feedback.
All reactions