Closed broyde closed 6 months ago
Hey @broyde!
Thanks for bringing this to our attention! It looks like we might need to run internal document transforms on the queries passed to MockLink
to ensure they match. I don't have a timeline on a fix for this, but we'll take a look when we get to it. Again, thanks for reporting it!
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. For general questions, we recommend using StackOverflow or our discord server.
Issue Description
The same query is used for main code and mocked response in test. This works fine until we add
@nonreactive
directive to this query. Query example:Warning example:
Whole test: https://github.com/broyde/apollo-mock-nonreactive/blob/main/nonreactive.test.js
It would be great to automatically remove
@nonreactive
from mocks passed toMockLink
/MockedProvider
. It should help to match actually performed query with the mocked one.Link to Reproduction
https://github.com/broyde/apollo-mock-nonreactive
Reproduction Steps
No response
@apollo/client
version3.9.11