#Invalidate all the queries in the app

1 messages · Page 1 of 1 (latest)

gray star
#

I have a dropdown that changes the entire context for the app, like a change user type situation. Therefore, I need to force a refetching of all the queries. Usually I'd use queryClient.invalidateQueries() without any args, but this yields errors and doesn't actually work. What should I do different?

supple girder
gray star
#

Will it? It seems I will still need to go over every single possibly used query and invalidate it individually 😅

rapid prawn
gray star
#

It's not actually a user change, but it's something with very wide implications.

#

@rapid prawn
the sequence of functions you invoked is basically like calling
queryClient.invalidateQueries()
This yields some obscure errors and doesn't actually cause a refetch (probably because of the said errors thrown stopping the process)

gray star
#

@solid zenith Sorry to ping, but could you help?