Skip to content

Why does using axios.all as multiple endpoints unify subscription names into one? #3343

Answered by EskiMojo14
dev-splin asked this question in Q&A
Discussion options

You must be logged in to vote

useLazyQuery only subscribes to one argument at a time, so each trigger is overriding the last.
If you want to subscribe to multiple at the same time, call the hook itself multiple times:

const res1 = useFetchApplicantInStepSearchQuery(80);
const res2 = useFetchApplicantInStepSearchQuery(81);
const res3 = useFetchApplicantInStepSearchQuery(82);
const res4 = useFetchApplicantInStepSearchQuery(83);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dev-splin
Comment options

Answer selected by dev-splin
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