tRPCttRPC
Powered by
piano1029P
tRPC•3y ago•
5 replies
piano1029

useMutation not handeling arguments correctly.

Hello, I have a mutation setup on the server with the input being an object containing the fields email and password. I am using the TRPC HTTP server on the backend. The request data is
{"0":{"email":"dev@dev.dev","password2":"test"}}
{"0":{"email":"dev@dev.dev","password2":"test"}}
and the response complains about receiving
undefined
undefined
instead of
object
object
. I'm using Zod for input schema.
Furthermore, the useMutation arguments are
any
any
according to Visual Studio Code intellisense
Solution
Had to add the superjson transformer
Jump to solution
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

useMutation error is array not message
Answer OverflowAAnswer Overflow / ❓-help
3y ago
useMutation called twice
Answer OverflowAAnswer Overflow / ❓-help
2y ago