T
tRPC

procedure input context

procedure input context

MMugetsu2/1/2023
Is it possible to accesss context in trpc procedure input validation? I have an aray of values in the trpc context and would like to make a procedure input schema to transform on those values to allow these as the input. Im using zod for input schema
Nnlucas2/1/2023
You can use a middleware after the input call to consume both. Or just do it in the procedure

Looking for more? Join the community!

T
tRPC

procedure input context

Join Server