how would you do this without the useQuery's onSuccess callback? - TanStack