-
I have basic setup with a query that retrieves some data, let's call it a 'user', and a mutation that modifies said 'user', updating the query cache with what comes back as the response, similar to https://tanstack.com/query/v4/docs/guides/updates-from-mutation-responses. What I want to create is a new query, that would use the 'user' data from the initial query, but add some additional information to it. One would generally use the I can't seem to come up with a way to create such a query that would achieve that result, yet behave like a completely normal reusable query. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Seems like you're looking for dependent queries: https://tanstack.com/query/v4/docs/guides/dependent-queries it even shows as an example how to "depend on a user" |
Beta Was this translation helpful? Give feedback.
Seems like you're looking for dependent queries:
https://tanstack.com/query/v4/docs/guides/dependent-queries
it even shows as an example how to "depend on a user"