I’ve been looking through the docs on tRPC and React Query but can’t quite figure this out.
To give a quick explanation of what I’m trying to do, I’m creating a system where a user can request to join a group and then the admins can accept or decline the request.
Component A is fetching the request status on the user side through a useQuery on one of my tRPC procedures.
Component B performs a mutation (accept or decline) on the admin side from one of my tRPC procedures and I want it to immediately update the request status that the user sees in Component A after the admin accepts or declines.
I’ve tried messing with refetchQueries() and invalidateQueries() in the onSuccess of the mutation but have had no luck.