-
Notifications
You must be signed in to change notification settings - Fork 7
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
Execute function of useLazyQuery should resolve FetchResult #174
Comments
Yes please 🤞 Having to store the result in component state is a pita. |
Totally agree with this. |
@tz5514 have you resolved this issue? |
@srijanrana no, still use |
|
We think the |
Hi, I just tried
useLazyQuery
for triggering query imperatively, and I found that the "execute function" would not resolve query result, but resolve withundefined
.This behavior make developer can't get query result by await the execute function.
For example, if I want to imperatively trigger query in a
handleClick
function and instantly use this result to do some calculating or logic, we can't.In addition, since
useMutation
has a similar returning API withuseLazyQuery
and Mutate function will resolve fetch result, and same onrefetch
function ofuseQuery
. I thinkuseLazyQuery
should has similar behavior. It should resolve with fetch result.Thanks!
The text was updated successfully, but these errors were encountered: