#Invalidate all the queries in the app
1 messages · Page 1 of 1 (latest)
Think that may be fixed with https://github.com/blitz-js/blitz/pull/3728
Will it? It seems I will still need to go over every single possibly used query and invalidate it individually 😅
@gray star couldn't you just logout the current user and login the new one?
If not, in my opinion, the way to reset queryClient you could do something like this
queryClient.cancelQueries()
queryClient.resetQueries()
queryClient.getMutationCache().clear()
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)
@solid zenith Sorry to ping, but could you help?