You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know how doable it is, but it would be very helpful, for some complex error handling cases, to have a way to get all the keys used on a specific tree, like,
Parent
Children
Children -> useQuery("todo", fn)
Children -> useQuery("something", fn)
Then, on the Parent, we could have something like a useGetDownstreamQueryKeys, that gets all the queryKeys from that node, and returns it as an array.
This, in conjunction with Query Observers, could make a very neat error handling case, where we can check if any of the requests downstream failed, and we could show the status of that specific page/widget/whatever, making it easier to handle complex apps error cases.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I don't know how doable it is, but it would be very helpful, for some complex error handling cases, to have a way to get all the keys used on a specific tree, like,
Then, on the
Parent
, we could have something like auseGetDownstreamQueryKeys
, that gets all the queryKeys from that node, and returns it as an array.This, in conjunction with
Query Observers
, could make a very neat error handling case, where we can check if any of the requests downstream failed, and we could show the status of that specific page/widget/whatever, making it easier to handle complex apps error cases.Beta Was this translation helpful? Give feedback.
All reactions