TaylorFay
TaylorFay
TtRPC
Created by TaylorFay on 1/12/2024 in #❓-help
trpc output dates are typed as strings and not dates
I'm using superjson as a transformer. When I query my data, it shows that fields that should be dates are typed as strings. How can I get them to be typed as dates?
9 replies
TtRPC
Created by TaylorFay on 1/12/2024 in #❓-help
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
TtRPC
Created by TaylorFay on 10/10/2023 in #❓-help
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
TtRPC
Created by TaylorFay on 12/19/2022 in #❓-help
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