TaylorFay
How to make trpc output return strings and not dates
I am not using superjson
I would like for all of my trpc routes to return dates as strings. However, right now, the types coming from my router show the output as dates. Any idea on how I can get the types to show as strings?
2 replies
how to access body in middleware
Hi, I’m using trpc with nextjs. Does anyone know how to access the request’s body in middleware? As per the Request docs, the body can only be accessed once via
await req.json()
. However, if I do that in the middleware, the body is unusable within the trpc procedure.4 replies
Is it possible to call one procedure in another?
I have multiple routers in my trpc server. For example userRouter (e.g. procedure: getUser) and postRouter (e.g. procedure: updatePost).
Is it possible to call the getUser procedure from my userRouter in my updatePost procedure? Or are all procedure effectively independent.
7 replies