-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQl Errors not being thrown in mutate call #5629
Comments
Same issue, did it get changed recently because i don't remember this behavior being problematic |
Currently I have the problem, that an error is thrown. In my opinion it would be better to just populate the error response, returned from |
@willipreuk yours seems to be another issue. Check #6070 |
Hi @kanishktokopedia 👋 v3.x.x was released in mid-2020, and so, while I can't comment on whether this was ever resolved in v2, this seems to be fixed now (here's the relevant test case): https://github.com/apollographql/apollo-client/blob/main/src/react/hooks/__tests__/useMutation.test.tsx#L332:L373 I hope this is helpful, thanks 😊 |
Intended outcome:
Ideally, when a GraphQL errror comes in mutation it should be thrown.
Actual outcome:
The call to apolloClient.mutate is never resolved.
How to reproduce the issue:
The lines here:
apollo-client/packages/apollo-client/src/core/QueryManager.ts
Line 225 in 65eef37
It creates an error but never rejects it as can be seen in the code written above. Although, adding the following line just below the tagged line works:
reject(error)
Versions
2.6.4
The text was updated successfully, but these errors were encountered: