NestJS · Senior · Question 26 of 75

Why is it useful to have the same validation and authorization for HTTP, GraphQL and message handlers?

Explanation

Guards and pipes can be written to work with any ExecutionContext type, or rules can live in services.

Further reading

Problem with a question

NestJS · Senior · question 26

Test yourself

Take the NestJS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz