-
Notifications
You must be signed in to change notification settings - Fork 787
Errors lost on cached results after errorPolicy: "all" #1781
Comments
We have a similar issue which manifests during SSR; However, if I set a breakpoint in my wrapped component during The wild thing is that if I set a breakpoint inside react-apollo's Query component, in The role of the queryStore isn't clear to me; I'm not sure if that's where errors are intended to be cached/retrieved from when the errorPolicy is |
Is there any updates about this issue? |
I've opened a PR to fix the Apollo docs with respect to this issue as it doesn't seem like Apollo will support error cacheing anytime soon. apollographql/apollo-client#4237 |
Can someone please explain the actual solve for the OG issue? I am not using any SSR, simply using apollo-cache-inmemory. It sounds like the fix is only if you decide to use SSR? |
From the docs ^^^^^ https://www.apollographql.com/docs/react/features/error-handling |
any updates on this @hwillson ? |
I'm using apollo and react to call a query that returns mixed results: error(s) and some data.
In order to handle the errors, but still be able to use the information given, I'm using the
errorPolicy: "all"
option in the query.The first time I mount the component
data
is populated with the partial informations anderror
with the errors returned by the query. If I change the route (unmounting the component) and then return on it, it shows the cached partial data but no errors, so I'm not able to handle errors anymore and detect that these are partial informations.Intended outcome:
The component shows me the original errors along with the cached data.
Actual outcome:
The props
error
isundefined
, the partial data are passed as if the query didn't return any error.How to reproduce the issue:
I don't know how to reproduce a query that returns both data and error; anyone can help me with that so I can show you some working code?
Version
Initially I tought that issue #1389 could related to this problem, but after all I think these are 2 different things. Maybe it's something related with the RC version I'm using?
The text was updated successfully, but these errors were encountered: