Skip to content

How can I validate an update input type? #101

Answered by MichalLytek
matcic asked this question in Q&A
Discussion options

You must be logged in to vote

typegraphql-prisma was always meant to be a source code generator, not a "DB into GraphQL API" converter/layer.
Adding decorators to types is just a workaround for those who want to add validation/other stuff without ejecting from the generator flow.

There's no solution for that and I can't imagine any for now. That two approaches just doesn't match together.
With code first approach #9 you would need to write the input classes by yourself, in order to modify them and add a decorator.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Nickesh
Comment options

@MichalLytek
Comment options

@kamaridesu
Comment options

@Nickesh
Comment options

@FRSgit
Comment options

Answer selected by matcic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants