T
TanStack3mo ago
quickest-silver

useQueries with retries and redirects end up using the same redirect for all Queries

When running code like this
const ids = [1, 2, 3]
const combinedQueries = useQueries({
queries: ids.map((id) => ({
queryKey: ['post', id],
queryFn: async () => await fetchPost(id), // gets data via a redirect to s3 presigned url
})),
})
const ids = [1, 2, 3]
const combinedQueries = useQueries({
queries: ids.map((id) => ({
queryKey: ['post', id],
queryFn: async () => await fetchPost(id), // gets data via a redirect to s3 presigned url
})),
})
the first requests go to and fail (this is expected to fail due to some dispatcher -> worker architecture)
http://path1
http://path2
http://path3
http://path1
http://path2
http://path3
every subsequent try alwys tries
http://path1
http://path1
http://path1
http://path1
http://path1
http://path1
Is this known behaviour? How can i fix this?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?