rustclan
Explore posts from serversreturn type of a query endpoint
Sorry, I just saw these messages.
At the moment I mainly use refetch to update the response once something has been updated/deleted. I should probably just return the updated document in the response to the mutation, or in the case of a delete just remove it from the original data list. Would be more efficient for sure.
8 replies
TTCTheo's Typesafe Cult
•Created by rustclan on 9/3/2023 in #questions
TRPC error handling
Thank you 🙂
4 replies
TRPC ratelimiting endpoints
Hmm, yes okay. I see what you are saying. This depends on vercel runs nextjs api endpoints, im not entirely sure. For now, this is working just fine. But I should look into this just encase. Thank you very much for the help 🙂
20 replies
TRPC ratelimiting endpoints
Hi, thank you for the response. But I'm not sure I follow. Since this is hosted on serverless infrastructure (vercel), I don't think this is possible to use a in memory cache to stop this from happening? I may be misunderstanding your solution though.
20 replies
TTCTheo's Typesafe Cult
•Created by rustclan on 4/30/2023 in #questions
TRPC ratelimiting endpoints (race conditions)
bump
3 replies
TTCTheo's Typesafe Cult
•Created by rustclan on 4/30/2023 in #questions
TRPC ratelimiting endpoints (race conditions)
function which needs to be ratelimited (using the redis cache)
A big band aid fix would be to just add an artificial wait:
But obviously this is not very elegant..
3 replies
trpc auto refreshes page when I lose focus
Hi. Thank you 🙂
I have found
refetchOnWindowFocus
which is what I am looking for. Here is my fix for any future people.
https://tanstack.com/query/v4/docs/react/guides/window-focus-refetching5 replies