New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema validation #3
Comments
You'd just want to write some helper functions and then implement them in your resolver file |
That would be a good use-case for pipes integration. |
@kamilmysliwiec To use the pipes, we need a decorators like @Body(new ValidatorPipe()) in controllers, right? Do you have plans to create a decorator for resolvers like @Args()? |
@partyka95 we don't need that, see microservices & websockets. you can use pipes with them already |
Could anyone give an example? |
At the present time, it looks like pipes are loaded by the @kamilmysliwiec is it correct? Would it take a lot of work to me to create a PR? Or should we do something special for GraphQL Resolvers? (Like targetting Thanks! |
|
Any clearer examples on how to best implement validation for mutation inputs? Things like min/max lengths, advanced type fields etc. that we are used to from packages like class-validator? |
I'm interested in this as well. Maybe with anotations on the fields in the
schema?
…On Fri, Nov 9, 2018, 06:32 Zeldaze ***@***.***> wrote:
Any clearer examples on how to best implement validation for mutation
inputs? Things like min/max lengths, advanced type fields etc. that we are
used to from packages like class-validator?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE64MKW58oNuR1213DNmIS5pI1VLes98ks5utRN7gaJpZM4RVVxf>
.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
Is there any good way to validate data in mutations like string length etc?
typescript mutation { createSth(name:"something", website:"http://test.com/") { id name website } }
How can i validate name or website data?
PS: Kamil, great job with nestjs!
Regards
The text was updated successfully, but these errors were encountered: