Validating input inside middleware declaration
But type of
input
is unknown and gives rise to a bunch of type errors
Apologies in advance for the newbie question3 Replies
You need to add an input validator before
Define Procedures | tRPC
Procedures in tRPC are very flexible primitives to create backend functions; they use a builder pattern which means you can create reusable base procedures for different parts of your backend application.
I'd only recommend doing this through a middleware if it is actually reused in multiple procedures