Skip to content
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

More descriptive error feedback for error 'No more mocked responses for the query' #309

Closed
oliverjohns opened this issue Aug 6, 2021 · 1 comment
Labels
project-apollo-client (legacy) LEGACY TAG DO NOT USE

Comments

@oliverjohns
Copy link

Writing tests for Apollo is gruesome due to this unintuitive error. Whenever one mocks a query or mutation, if the mock isn't exactly the same as the real one, the error 'No more mocked responses for the query' is thrown.

The issue is that this error doesn't state what the discrepancy is between the mock and the real query, which leads to a lot of time being spent double-checking mocks and queries. For complex queries this can be a real time sink.

This error should point out what exactly is not matching. This would save testers a ton of time.

@jpvajda
Copy link
Contributor

jpvajda commented May 25, 2022

👋 I'm going to close this out, as we have an umbrella issue tracking testing improvements here apollographql/apollo-client#9738

@jpvajda jpvajda closed this as completed May 25, 2022
@jpvajda jpvajda added the project-apollo-client (legacy) LEGACY TAG DO NOT USE label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project-apollo-client (legacy) LEGACY TAG DO NOT USE
Projects
None yet
Development

No branches or pull requests

2 participants