tRPCttRPC
Powered by
Long TranL
tRPC•16mo ago•
4 replies
Long Tran

useQuery() integration is not passing `staleTime` to underlying query? (11.0.0-rc.593)

I'm attempting to set up persistence for my queries. As part of this, I need to set
staleTime
staleTime
on queries to something other than 0 to tell React Query that data loaded from storage is to be considered fresh. However, this doesn't work in practice if
staleTime
staleTime
is configured at the query level. I've managed to get persistence working correctly when configuring the query client's default options.

Is there an interaction that I'm not understanding here? Any advice would be welcome, thanks!
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

trpc version 11.0.0-rc.383 breaks turbo
shikishikichangchangSshikishikichangchang / ❓-help
16mo ago
useQuery with query params
PuzzlesPPuzzles / ❓-help
3y ago
v10, passing useQuery options, queryKey mandatory?
SimonSSimon / ❓-help
3y ago
All my mutations are failing due to an empty body after upgrading to 11.0.0-rc.362
KrangaKKranga / ❓-help
2y ago