Having difficult using useQuery with generics - TanStack