queryFn, call different endpoint every Nth repetition #2833
Answered
by
TkDodo
czescwojtek
asked this question in
Q&A
-
Is it possible to use useQuery hook with refetchInterval option set to run different queryFn every nth, let's say 10th, repetition like so:
|
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Oct 27, 2021
Replies: 1 comment 2 replies
-
You would need to do that in userland - keeping track of the amount of fetches in local state, then changing the url your queryFn goes to depending on that. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
czescwojtek
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You would need to do that in userland - keeping track of the amount of fetches in local state, then changing the url your queryFn goes to depending on that.