Varich
automatically add current path to the useQuery
Is there a way and how to add the current url(path) when call useQuery or useMutation, so that the current path is also being sent to the backend everytime. I think modify TRPCReactProvider might be useful, but that seem to be only evaluate once and not changing according to the page. My use case is that I'm doing /org/[orgname] and I want the orgname to be send to the backend everytime.
2 replies
Mutation with react-hook-form
Hello I'm trying to use mutation with react-hook-form. In the form, I will have to give interface of the input that I want, so I'm wondering whether it's possible to get the type of input to some mutation from trpc and pass it as input type.
4 replies
Making input to trpc route from Prisma generated type
Hello everyone, I want to make my TRPC update route generic and type safe. I already have all prisma setup. Would it be possible for me to reuse prisma generated type as the input and converted it to zod object automatically?
I am trying not to copy myself and make it dynamic for future changes Thanks!
3 replies