next
Round
Technologies
Experiences
Contribute
Login
next
Round
Technologies
Experiences
Contribute
Login
Question Loading...
Guards
1. What is a guard in NestJS and when should you use one over middleware?
Level: Expert | Frequency: High
2. How do you implement role-based access control (RBAC) with a guard and Reflector in NestJS?
Level: Expert | Frequency: High
3. How do you implement a @Public() decorator to skip a global auth guard for specific routes in NestJS?
Level: Expert | Frequency: High
4. What does a guard return when it needs to deny the request and how can it throw a custom exception in NestJS?
Level: Expert | Frequency: High
5. How does the request lifecycle behave differently for WebSocket gateways vs HTTP controllers in NestJS?
Level: Expert | Frequency: High
6. How do you write a single guard that works across both HTTP and WebSocket transports in NestJS?
Level: Expert | Frequency: High
All Topics
Basics
Modules
Decorators
Controllers
Dependency Injection
Providers
Architecture
Request Lifecycle
Middleware
Guards
Interceptors
Pipes
Filters
Exception Handling
API Design
GraphQL
Database and ORM
Microservices
Authentication and Authorization,
Interceptors