Replies: 1 comment 2 replies
-
you can. if typescript complains, just do:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I have some custom errors in my app that I know that if I throw them (from certain logic in my
select
functions that I pass to some queries), certain other queries need to be invalidated.I've added a global
onError
handler to myqueryClient
, but can't seem to figure out how to invalidate queries by key from inside it:I can't call
queryClient.invalidateQueries(...)
since I'm "currently" defining it, andquery.invalidate()
invalidates the query that got the error (but I want to invalidate other queries too).Would appreciate the help.
Beta Was this translation helpful? Give feedback.
All reactions