How to change the input type in trpc call

For context, i want to try to update the user's profile but i cant seem to add both the ctx argument and the input as a z.object (like in the example on their docs https://trpc.io/docs/v9/react-mutations ). I am not really sure what is wrong, any pointers would be appreciated.
useMutation() | tRPC
The hooks provided by @trpc/react are a thin wrapper around React Query. For in-depth information about options and usage patterns, refer to their docs on Mutations.
5 Replies
r.omaarr
r.omaarr3y ago
Argument of type '{ ctx: any; input: z.ZodObject' is not assignable to parameter of type '(opts: ResolveOptions<{ _config: RootConfig<{ ctx: { session: Session | null; this is the error message
cje
cje3y ago
read the v10 docs
r.omaarr
r.omaarr3y ago
oh didn't notice i was reading the old docs sorry !!
cje
cje3y ago
no worries lol google searches still hit the v9 docs most of the time
r.omaarr
r.omaarr3y ago
Hey, just wanted to thank you. This fixed 90% of the problems i had with trpc
Want results from more Discord servers?
Add your server