Skip to content

RTK Query multiple requests inside injectEndpoints/queryFn reusing other endpoints #2972

Answered by phryneas
panoramix360 asked this question in Q&A
Discussion options

You must be logged in to vote

Your solution is creating multiple getProfile cache entries in addition to that getData cache entry - that will also contain the same data. If it works, it works - but honestly I would try to not call one endpoint from another.
I'd either have it be all requests or combine multiple hooks into one custom hook.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@panoramix360
Comment options

@phryneas
Comment options

@panoramix360
Comment options

Answer selected by panoramix360
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