-
I recently ripped out tRPC to use oRPC on a NextJS project. Whenever I call a procedure with a date input it fails (dates as Outputs succeed). Here's a contrived example: export const healthCheck = publicProcedure
.route({ method: "POST" })
.input(z.object({ text: z.string(), date: z.coerce.date() }))
.handler(async ({ input, context: ctx }) => {
ctx.logger.info(input.date.getUTCDay(), "Saying hello...")
return {
greeting: `Hello ${input.text}`,
date: new Date(),
}
})
// ... stub
const { data } = useSuspenseQuery(
orpc.healthCheck.queryOptions({
input: { text: "Testing", date: new Date() }, // FIXME: The date fails
})
) The component renders infinitely |
Beta Was this translation helpful? Give feedback.
Answered by
Overdash
May 23, 2025
Replies: 1 comment 7 replies
-
Show me your |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Marking this as answered as I don't think it's oRPC problem.
Could be hydration related but not worth the energy to dive deeper right now :)