Passing generic inside tRPC query
Hi, I hope you're doing well.
Server:
Nextjs front:
I would like to pass the type of my Prisma query (
{ include: { image: true } }
) to findManyUser, so users
has the expected type and not the default type provided by Prisma (without generics : DefaultArgs
).
Thanks for your help.
Have a great day/night!3 Replies
I saw that there are several Git issues related to this topic, so feel free to reply to this post !
:trpc:
GitHub
Dynamically type the data result of a hook according to inputs ยท tr...
Hey, folks! We ran into a hiccup with trying to dynamically type the data that comes back from our endpoint. Imagine an identity endpoint that can return either a string or a number: // I recognize...
Thank you very much, I am now sure that it's not doable right now ๐ค
Have an excellent day!
(PS: I will close the post at the end of the day if anyone wants to add something in the meantime)