valdinei
valdinei

Reputation: 89

Change ValidationPipe errors from NestJS + GraphQL

Just posting here the workaround that I found in GitHub to change the NestJS Validation errors. I was trying to format the errors and include the field names.

I spent a lot of time in NestJS docs, googling and reading GitHub issues until I found this one, with a perfect answer (for now, as I see that it's something not developed yet in NestJS in an easy way).

Upvotes: 1

Views: 2564

Answers (1)

valdinei
valdinei

Reputation: 89

The full workaround (and the discussion) you can find here:
https://github.com/nestjs/graphql/issues/1053#issuecomment-786972617

There are other useful (and simple) solutions in this thread. ;)

Upvotes: 1

Related Questions