t
tRPC
t
tRPC
Input parser can't return am array?
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
N
Nick
•
3/15/23, 11:09 PM
Can you share your code
?
N
Nick
•
3/16/23, 8:20 AM
You can
’t chain input multiple times AFAIK
, definitely shouldn
’t
N
Nick
•
3/16/23, 8:20 AM
You don
’t pass
.parse from Zod either
, just pass the Zod type
N
Nick
•
3/16/23, 8:21 AM
I think it
’s worth going back to the docs and sticking to the patterns they recommend
N
Nick
•
3/16/23, 11:44 AM
Ah I could be mistaken then
N
Nick
•
3/16/23, 11:46 AM
Right so this
https://trpc.io/docs/procedures#multiple-input-parsers
It will
(I guess
shallow
) merge the outputs together
, so it has to be an object because it only makes sense to merge objects
N
Nick
•
3/16/23, 11:47 AM
I doubt they
're chained like a
.pipe or middlewares
, more you get to process the raw input multiple times and the results get merged