piano1029
piano102915mo ago

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"}} and the response complains about receiving undefined instead of object. I'm using Zod for input schema. Furthermore, the useMutation arguments are any according to Visual Studio Code intellisense
Solution:
Had to add the superjson transformer
Jump to solution
2 Replies
Solution
piano1029
piano102915mo ago
Had to add the superjson transformer
Nick
Nick15mo ago
Have you disabled batching on the API side? What does the network debugger show? also what does the procedure definition look like?