How to type a helper function to standardise loading and error states with a useQuery call? - tRPC