useLazyQuery execution function should return a promise
People don't know if they should use a query or a mutation to login an user when that login performs no side-effect (ie, just query for an auth token). https://stackoverflow.com/questions/50189364/shouldnt-the-login-be-a-query-in-graphql But Apollo users tend to currently use mutations because they want the operation to execute only after user press a submit button. Recently a new useLazyQuery was added (by @FredyC I think?), and it could be useful to solve this problem: keep a query, but actually execute it after user press a button. Unlike mutations, it does not return a promise when executed. I suggest the following should be possible:  **edit**: actually the screenshot is wrong but you probably understand the point of returning a promise instead of void here (at least in TS typings) Note other apis do return a promise when called (see "refetch" for example). I think useLazyQuery should follow the exact same convention and not return void.
Posted by slorber on Sep 16, 2019, 5:33 PM
Tags
Related issues
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
Proposal to Reorganize the Moderation Team and Review Moderation Policies
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
proposal: container/...: generic collection types
Better Custom Endpoint BYOK
A concrete policy for backward compatibility until Godot 5.0
New MTP models not supported
Tracking: 429 / Capacity Issues
useLazyQuery execution function should return a promise
People don't know if they should use a query or a mutation to login an user when that login performs no side-effect (ie, just query for an auth token). https://stackoverflow.com/questions/50189364/shouldnt-the-login-be-a-query-in-graphql But Apollo users tend to currently use mutations because they want the operation to execute only after user press a submit button. Recently a new useLazyQuery was added (by @FredyC I think?), and it could be useful to solve this problem: keep a query, but actually execute it after user press a button. Unlike mutations, it does not return a promise when executed. I suggest the following should be possible:  **edit**: actually the screenshot is wrong but you probably understand the point of returning a promise instead of void here (at least in TS typings) Note other apis do return a promise when called (see "refetch" for example). I think useLazyQuery should follow the exact same convention and not return void.
Comments (0)
No comments yet. Start the discussion.