tRPC findUnique problem
I am having this issue with tRPC which driving me crazy
5 Replies
Looks like a type error more related to Prisma than trpc. I guessing because findUniqueOrThrow isn't nullable. But you defined your output as product.nullable().
Let me know if that's the issue.
i am not with my laptop rn but i tried that as well it doesn’t work
even cursor cant fix it btw
Can you try explicitly typing the product variable?
i didnt understand what you said but i tried this and it works
i closed and reopened cursor and it worked lol
thank you for your help