Avraj
Explore posts from serversIs there a way to refetch a query with new parameters?
you're definitely right there, but there is still an issue of requests sent on behalf of tRPC when focusing on the window. i like that feature but when focusing back on the window it'll send new requests. but now it'll send with
skipCache
set to true29 replies
Is there a way to refetch a query with new parameters?
alright so i've tried this approach too and there is one slight issue. let me explain.
everything works well until the
handleRefresh
function has stopped calling.
say the user wants to refresh the list of guilds once again. the skipCache
state is now stuck at true
and handleRefresh
won't do anything anymore when called29 replies
Is there a way to refetch a query with new parameters?
imagine a discord bot dashboard where you have a list of servers
once a user is in this page, say they create a new server in discord but now that server is not part of the list in the web app because it's still using the cache which will last another 15 mins
the refresh button will give them the option to fetch the latest array of servers
29 replies
Is there a way to refetch a query with new parameters?
when the page is first loaded, the data that is fetched should be from the cache (if it's available in the server). but the user will now have the chance to fetch the latest data by clicking a button. this button is supposed to invalidate the cache in the server and return the most up to date data
29 replies
Is there a way to refetch a query with new parameters?
so i've used invalidation before, but the reason it doesn't work in my case is that it uses the same query details to make another request to the server. there's no way for me to explicitly state in the invalidation that this specific request is supposed to have a new set of parameters.
29 replies
Is there a way to refetch a query with new parameters?
thanks i've tried this before, but such is the feature. if a user wants the latest data it makes for bad ux to make them wait a certain time. also as mentioned it's an expensive query so it should only be done every now and then, which is why the cache i have on the server lasts 15 mins. is there no workaround at all for this?
29 replies
DTDrizzle Team
•Created by Avraj on 12/25/2023 in #help
Update and return a single row only when using .update()?
Oh I see. Thanks. I've been getting the first element of the returned array so I think I'll stick with that.
5 replies