Runtime validation of output on client and server #1517
Locked
carnesen
started this conversation in
RFC / Ideas
Replies: 2 comments 8 replies
-
Unsure why you'd want runtime validation on the client, you should be able to trust results coming from your own server, right? If you want runtime validation on the output, you can check out this thread I wrote on twitter https://twitter.com/alexdotjs/status/1488148385353895939 |
Beta Was this translation helpful? Give feedback.
8 replies
-
An |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are evaluating tRPC and want to confirm one aspect of its feature set that we found surprising. Can you confirm that tRPC does not currently support automatic runtime validation of route output on client and server using Zod schema? What I mean is that I want to define a route like
and tRPC will automatically:
output
Zod schemaoutput
Zod schemaWe'd like to do runtime validation of both the input and the output on both the client and server because the schemas can get out of sync for example if we've deployed a new server but the client is still running an older version of the schema.
Beta Was this translation helpful? Give feedback.
All reactions