RTK Query dependent queries #1683
Unanswered
christopanayotovvia
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Dependent queries is a term that we have taken from the comparison list on React-Query's homepage, and over there it means that two queries within a component can depend on each other. const result1 = useFirstQuery(someArg)
const result2 = useSecondQuery(result1.data?.something, { skip: !result1.isFulfilled }) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
The documentation states that the RTK Query supports dependent query . I cannot seem to find how to use dependent queries anywhere else.
I'm little bit how to achieve the following:
Let's say I want to achieve the following:
configuration
. In it there isbaseUrl
baseUrl
I want to fetch the user. So theuser
is dependent query on theconfiguration
configuration
anduser
( ex. prepend some headers like x-conf-smth, x-user-smth )How this can be achieved?
Beta Was this translation helpful? Give feedback.
All reactions