Skip to content

Are multiple queries with the same key but different options considered separate? #114

Answered by aantipov
sid-6581 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  1. at first, requests are deduplicated and one request is issued.
  2. second hook will used the resolved value going forward (never update)
  3. first hook will keep re-fetching in the background (according to default options)

Feel free to check it and tell if it works as expected :)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@sid-6581
Comment options

@aantipov
Comment options

@sid-6581
Comment options

Answer selected by sid-6581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants