-
Sometimes I want a query to only fire once, like if I am populating a form. I don't want to keep refetching the data in the background since the initial form values will be populated only a single time. For queries like this I typically set So in essence, I'll have both of these on the same page:
I didn't really see this scenario addressed in the documentation. Will this work as expected? Would the query be executed twice, or would one of the queries be able to use the cached version under the same key despite them having different options? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The behaviour is driven by ReactQuery which is used by VueQuery under the hood. I believe it should work correctly. Queries are identified by key. I think what will happen in your use case is:
Feel free to check it and tell if it works as expected :) |
Beta Was this translation helpful? Give feedback.
The behaviour is driven by ReactQuery which is used by VueQuery under the hood.
I believe it should work correctly.
Queries are identified by key.
I think what will happen in your use case is:
Feel free to check it and tell if it works as expected :)