Replies: 1 comment
-
| Issue that contains a proposal regarding this: | 
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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
I was just wondering if remote functions should have the option to validate their output just like the input.
TRPC offers the option to validate the output object https://trpc.io/docs/v9/output-validation.
Use case:
I have a remote function that makes a http call to a 3rd party backend. I now have to assume that the type matches my expected type or I have to validate by hand (which is not the worst thing but since we have input validation, we might as well have output validation).
Looks like this:
Could look like this:
It would default to
"unchecked"so when we interact with a orm or any typesafe source, we don't need to do any additional work.Beta Was this translation helpful? Give feedback.
All reactions