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
No description
No description
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...
No description
No description
Jump to solution
1 Reply
Solution
Ahmad Shbeeb
Ahmad Shbeeb5mo ago
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
No description
No description
Want results from more Discord servers?
Add your server