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

Question: opt-out of refetch when variables change #1556

Open
heivo opened this issue Jun 3, 2024 · 1 comment
Open

Question: opt-out of refetch when variables change #1556

heivo opened this issue Jun 3, 2024 · 1 comment

Comments

@heivo
Copy link

heivo commented Jun 3, 2024

Hi,

I'm using useLazyQuery that I manually (re-)trigger when a user presses a button. I have the problem that the query is also re-triggered automatically whenever one of the reactive query variables change.

Is there any way to prevent this?

Thanks in advance

@AfaqNabi
Copy link

AfaqNabi commented Oct 5, 2024

I have the same question i cant seem to find anything in the Apollo client docs about this.

using non reactive variables disables this though, but that's not ideal having to copy reactive vars into a regular ts variable every time.

it also has the side effect of bypassing the cache and hitting the server every time no matter the fecthPolicy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants