Ive been pulling my hair out for the last hour and cannot seem to find whats happening. In my TRPC router, I have the following very simple procedure defined (initially a unique model but seems to be a problem with everything using FindMany):
getAll: protectedProcedure.query(({ ctx }) => {
return ctx.prisma.example.findMany();
}),
And why I try access it on the front end I dont see the typical type completion showing whats on the model but rather some other stuff (at, concat, copyWithin... see the picture attached):
import { api } from "~/utils/api";
const Dashboard: NextPage = () => {
const router = useRouter();
const ctx = api.useContext();
const { data } = api.example.getAll.useQuery();
return (
<>
<main>
<div>
<p>Your Dashboard</p>
<br />
<ul>{data.}</ul>
</div>
</main>
</>
);
};
export default Dashboard;
Any other prisma functions (findFirst, findFirstThrow... all have autocompletion on the front end). What am I missing?