Hi,
I want to return the previous state if theres a network error. Can I do that by overriding the root operation type in my cache object?
if (loading) {
const data = prevState() // or something
return (
...
)
}
Hi,
I want to return the previous state if theres a network error. Can I do that by overriding the root operation type in my cache object?
if (loading) {
const data = prevState() // or something
return (
...
)
}
@endymion1818 if you’re using something like useQuery
, the returned result object has a previousData
property.