-
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
useLazyQuery throws instead of returning with error #9669
Comments
As a side effect of not throwing any ApolloError objects (see removed code), this commit also fixes issue #9669.
@alexandergottlieb This should be fixed if you run |
Thanks @benjamn for the quick fix! |
I think you're right @pumuckelo—throwing/rejecting makes everything trickier, and potentially discards information about In other words, what I said in #9142 (comment) and PR #9684 applies to I've assigned issue #9065 to myself and added it to the v3.6.x patch releases milestone. Thanks! |
Intended outcome:
When
useLazyQuery
encounters an error, I would expect it to return aQueryResult
witherror
populated, just likeuseQuery
.This should work:
Actual outcome:
useLazyQuery
throws, so theif (error)
clause is unreachable.How to reproduce the issue:
Sandbox: https://codesandbox.io/s/uselazyquery-error-3224g3?file=/src/test.spec.js
Versions
The text was updated successfully, but these errors were encountered: