Say I have multiple related queries:
api/rewards/planapi/rewards/achieved
After a mutation, I need to refetch both queries.
What would be the recommended way to construct the query keys for the queries above and what would be the query key to provide queryCache.refetchQueries?
The documented type of the query key parameter is:
queryKey: String | [String, Variables: Object] | falsy | Function => queryKey
Does this make sense?
useQuery(["rewards", {plan: true}], ...)useQuery(["rewards", {achieved: true}], ...)queryCache.refetchQueries("rewards")
Thanks