I was trying to make an app using tRPC, prisma and neon database I am facing some issues
So what I wanna do is push details of a playlist into DB
Here is what I have defined in my trpc/index.ts :
Here is how I am trying to call the api :
It's throwing an error which is :
I have no clue how to fix this, help
4 Replies
The arguments belong in the mutate call, not when you create the mutation
So how exactly do I go on about fixing that? Sorry I am very new to this so I am a lil confused
useMutation() | tRPC
The hooks provided by @trpc/react-query are a thin wrapper around @tanstack/react-query. For in-depth information about options and usage patterns, refer to their docs on mutations.
Thanks!