t
tRPC
t
tRPC
Best practices for updating a shared type already being used in production
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
•
1/30/23, 6:26 PM
You can do some magic with Zod
. Between
.preprocess and
.transform you can add backward compatibility to inputs
/outputs pretty easily
N
Nick
•
1/30/23, 6:27 PM
or you could probably set up a middleware to migrate requests up or down based on some version header you attach to requests
N
Nick
•
1/30/23, 6:27 PM
or the classic
: versioned routers