How to use class-validator for ObjectType (output data)? #1173
Unanswered
alex-kovalchuk
asked this question in
Q&A
Replies: 1 comment 3 replies
-
So you want to allow storying/calculating invalid data in all over your code but only return error that the used data is invalid? I can't imagine a use case for output types validation. You should just make sure the values you create in your business code are correct, then just return. |
Beta Was this translation helpful? Give feedback.
3 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.
-
Hello. I need to validate input and output data.
If I pass an invalid UUID value to
UserLoginDto.token
, then this value will be returned without problems, but I expect aGRAPHQL_VALIDATION_FAILED
orINTERNAL_SERVER_ERROR
error. Then I can log this error and fix it.Thanks.
Beta Was this translation helpful? Give feedback.
All reactions