Wrong type for results
I have a query that has a couple fields with the
Date
type, however when queried with TanStack they are being returned as string
. Is there a way to cast them to Date
again?Solution:Jump to solution
Data Transformers | tRPC
You are able to serialize the response data & input args. The transformers need to be added both to the server and the client.
2 Replies
Solution
Afaik you need to use a transformer
https://trpc.io/docs/server/data-transformers
Data Transformers | tRPC
You are able to serialize the response data & input args. The transformers need to be added both to the server and the client.
Thanks