NotZelda
How to define per route staleTime on queryClient?
It looks like I am unable to override the default stale time provided to react query client, no matter how I define the the route. Is TRPC overriting these dafult somewhere down the chain?
By creating the queryClient in this way, I would expect the api route: api.performanceMetrics.getEmployeeMetrics to have an infinite stale time, but it still coming in with the default 30 seconds.
I would like to avoid having to wrap every route with my own definition of staleTime, however I also want to make sure no matter why I call these hooks in my app they all have the same staleTime.
7 replies