T
tRPC

❓-help

Have middleware require a "base" input

DDavid5/11/2023
Is there a way to have middleware add a minimum required input, like an org id? So that every procedure with that middleware always at least gets that passed in
Nnlucas5/11/2023
You can call .input multiple times and the inputs will get merged So .input.use.input is the pattern you probably want Right now only inline middlewares can consume the input in a typesafe way though, t.middleware can't do that and we have a ticket open for it

Looking for more? Join the community!