NestJS · Middle · Question 63 of 75
What's a sign that a Nest controller is doing too much?
- 1It has more than one route
- 2It uses DTOs
- ✓Correct answer: It contains business rules, database queries and orchestration instead of delegating to services
Explanation
Thin controllers are easier to test, and the same logic can be reused by queues, schedulers or GraphQL resolvers.