-
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
MockedProvider - mutation errors are not passed to the component #4283
Comments
What versions are you using? |
Having the same problem, with "apollo-boost": "0.1.7", passing something like
to the MockedProvider, my console returns If I pass the same for a Query, it works just fine btw.. |
Same with version 2.5.1 |
I see the same, but in queries as well. Both of these:
and
Simply throw an error in Jest and fail the test. Using:
|
I'm experiencing the same, what's the workaround if a fix is missing? |
We managed to get around it using errorPolicy if anyone else gets stuck: <MockedProvider mocks={[mocks]} addTypename={false} defaultOptions={{
mutate: {
errorPolicy: "all"
}
}}>
<Component />
</MockedProvider> |
|
We ran into the same issue and the error is no longer thrown if we handle the error using an
|
We are planning a significant |
Hi,
I have been facing a problem mocking data with MockedProvider.
With queries all works as expected, when I mock success and errors, the problem comes with mutations, success are ok but when I try to mock an error it is not passed to my component in the render function, instead an Error is thrown.
Test:
Component:
When I run the test it just throw the exception but in a live environment it is passed to the component!
The text was updated successfully, but these errors were encountered: