trpc useQuery/useMutation not inferring return type of prisma query

Env: Node18 , npm
i'm using turborepo with the server as Honojs + hono-trpc adapter and the client as react vite

So i've already did the setup as said in the docs and everything is working perfectly everything returned from the trpc procedures is inferred except when i return a prisma query then the inferred type is "any" ??

Even though the procedure output is correct but the client is "any" only with prisma
i've already tried using superjson transformer still no luck
Screenshot_from_2024-08-10_19-47-35.png
Screenshot_from_2024-08-10_19-45-24.png
Solution
i solved it
so it was an error with the context which contains (prisma and telegram bot) not being inferred from the client so i had to type it manually now all returned prisma queries works as expected
Screenshot_from_2024-08-11_19-38-00.png
Screenshot_from_2024-08-11_19-37-36.png
Was this page helpful?