T
tRPC

convert the result to date objects

convert the result to date objects

Hhachoter4/23/2023
I am not sure if this is even trpcs responsibility but I would like to get my date objects as date objects not strings, the main reason is actually because when I type it on the frontend I am using the prisma client amd it doesn't match up
Nnlucas4/23/2023
You want a transformer, it’s a standard tRPC feature you just have to enable By default dates get converted to strings by the tRPC types so that should at least be accurate

Looking for more? Join the community!

T
tRPC

convert the result to date objects

Join Server
Recommended Posts
ECONNREFUSED with TRPC call on VercelAnyone run into this before? I just deployed my app to Vercel and I run into this error when I triggInvalid ValDoes TRPC string input have a limit? https://prnt.sc/KlXlyoGrzP8P Edit: It was actually from stripis possible to combine next-minimal-starter with react-router-dom ?Hi, I'm trying to combine https://github.com/trpc/trpc/tree/main/examples/next-minimal-starter and rusing same query for entries appHow to use same query for many components? I don't want to request api for many times ;-; I can't pHow can I make a direct fetch on a router endpoint from TRPC in NextJS on client?In the documentation you can use the vanilla TRPC client like this: ``` const bilbo = await clientHow to get unwrapped errors out of proxy clientI'm using sveltekit and in order to redirect from SSR you need to throw an error: https://kit.sveltCan you get the queryClient without using a hook?Can you get the queryClient without using a hook?How can I reset the cursor when using useInfiniteQuery?I have various filters that I can set for the query, but when setting those filters I need to reset How does routing work in tRPC especially when using merged routers?I am having trouble understanding how tRPC lays out routes. Let's say I have the below ```typescripwhere is useQuery [key]?Learning trpc, i use to tanstack with queryKey, can not find how that works with trpc, if i want tuseInfinieQuery with initialData, Refetch only after second change of inputsHi everyone, I have the problem as stated in the title. My code looks like the following: ```ts Adding tRPC HOC breaks zustandIt seems that adding the trpc hoc breaks my zustand stores initial values and generates bad data. Af