Indigo
Indigo
TtRPC
Created by Indigo on 7/17/2024 in #❓-help
How can you extract the mutation type signature?
Hi folks, this isn't a major issue and not blocking by any stretch. I was hoping to abstract my mutation callback so that I can keep my router relatively flat.
export const getUserAuthRouter = () =>
router({
googleAuthRedirect: publicProcedure
.input(z.object({ credential: z.string() }))
.mutation(googleAuthRedirectMutation),
});
export const getUserAuthRouter = () =>
router({
googleAuthRedirect: publicProcedure
.input(z.object({ credential: z.string() }))
.mutation(googleAuthRedirectMutation),
});
If I wanted to do something like this, is there a way to pull out the type signature for my callback? I tried importing a few things but they were all in a module explicitly labelled not to import from 😅 Thanks!
3 replies