-
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 ignores changes to the query document #10496
Comments
Hey @laytong 👋 This looks related to #10198, just used in a slightly different way. Seeing as I can't guarantee a time frame on a fix, but we will try to get to this when we can! Feel free to submit a PR if you're interested in fixing yourself and we'd be happy to review it 🙂 |
* Allow `useLazyQuery` trigger fn to change `query` fixes #10496 * bump bundle size limit by a smidgen * Update .changeset/seven-cameras-kiss.md Co-authored-by: Jerel Miller <[email protected]> --------- Co-authored-by: Jerel Miller <[email protected]>
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. |
Issue Description
Despite what the documentation for useLazyQuery appears to suggest. Updating the "Query" option inside the trigger of the lazyQuery does nothing.
i.e.
const [fetchMyQuery] = useLazyQuery(QUERY_1)
and later calling
fetchMyQuery({ query: SOME_OTHER_QUERY})
still calls QUERY_1Link to Reproduction
https://codesandbox.io/embed/great-mestorf-f9nmze?fontsize=14&hidenavigation=1&theme=dark
Reproduction Steps
useLazyQuery with a default gql query,
Override it
The original query is executed and changes are ignored.
The text was updated successfully, but these errors were encountered: