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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
I built a codesandbox app (https://codesandbox.io/s/r7mxnx486q) and a next ssr app(https://github.com/chentsulin/react-apollo-issue) to confirm that they have totally different behavior when rendering the error.
For demo, I use following code exmaple
And a launchpad to throw a error in Hello query:
https://launchpad.graphql.com/kqrn1n1qj7
Client Side Rendering
(example: https://codesandbox.io/s/r7mxnx486q)
It works as expected in client side rendering.
Props were logged twice with following format (got error in second time rendering):
Server Side Rendering
(example: https://github.com/chentsulin/react-apollo-issue)
Props were logged twice with no error:
Relevant Issues
apollographql/apollo-link#437
apollographql/apollo-client#2880
#2124
#2087
#1389
I dived into source of
<Query />
, and logged some details. I found that it callwatchQuery
twice and create two different queryIds.Then it save errors into queryId: 2
And finally it found
queryStoreValue
from queryId: 1 but store only have value for queryId: 2, so it pass undefined as result to render props:what is the purpose of those two queryObservable? It is a little confusing.
react-apollo/src/Query.tsx
Lines 183 to 189 in 3985b47
The text was updated successfully, but these errors were encountered: