global queryClient.invalidateQueries() on error?
It looks off to me, so I changed it to:
Is this the correct way to handle per-query errors?
My logic:
- The original code invalidates all queries on error, which seems too broad.
- My version uses the
query argument to only invalidate the failed query via query.invalidate.Is this the right approach for handling errors and retries in TanStack Query? Any best practices here? Thanks.