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
I am using a suspense query and an error boundary to catch all unhandled errors. An example of usage:
// this component is wrapped in ErrorHandler and React.Suspense, error and networkStatus are just for debugging
const {data, error, networkStatus} = useSuspenseQuery<MyType>(Query, {variables: myVariables});
// data = null, error = "posted a few lines below", networkStatus: 8
everything works fine in 3.8.x, after update to 3.9.0+ suspense no longer throws an error and behaves more like useQuery hook without a loading property
an example of error
ApolloError: "error message coming from API"
at new ApolloError2 (index.ts:101:10)
at toApolloError (useSuspenseQuery.ts:322:7)
at useSuspenseQuery.ts:275:14
at mountMemo (react-dom.development.js:17225:19)
at Object.useMemo (react-dom.development.js:17670:16)
at Object.useMemo (react.development.js:1650:21)
at useSuspenseQuery (useSuspenseQuery.ts:269:16)
at CustomComponent
at renderWithHooks (react-dom.development.js:16305:18)
at mountIndeterminateComponent (react-dom.development.js:20074:13)
perhaps react-dom is involved somehow, I have a limited understanding of what happens here and cannot reproduce the issue if I pass my GQL response into unit tests apollo-client has (or I am bad at it)
server response example
{
"data": null,
"errors": [
{
"message": "error message coming from API",
"locations": [
{
"line": 2,
"column": 3
}
], // no idea where this comes from
"path": [
"items"
],
"extensions": {
"code": 4,
"exception": null
}
}
]
}
Unfortunately, I don't have more details at the moment. I am leaving this issue in case someone else faces similar behavior and I am able to get a reproducible sample
Issue Description
I am using a suspense query and an error boundary to catch all unhandled errors. An example of usage:
everything works fine in 3.8.x, after update to 3.9.0+ suspense no longer throws an error and behaves more like
useQuery
hook without aloading
propertyan example of error
perhaps react-dom is involved somehow, I have a limited understanding of what happens here and cannot reproduce the issue if I pass my GQL response into unit tests apollo-client has (or I am bad at it)
server response example
Unfortunately, I don't have more details at the moment. I am leaving this issue in case someone else faces similar behavior and I am able to get a reproducible sample
Link to Reproduction
N/A
Reproduction Steps
also discussed here:
#11664
@apollo/client
version3.9.0
The text was updated successfully, but these errors were encountered: