What interface must a class implement to act as an Interceptor in NestJS?
HttpInterceptor
RequestInterceptor
NestInterceptor
ResponseInterceptor
When using @Inject(), what should you provide as the argument?
@Inject()
The class name of the dependency.
The string 'inject'.
The injection token of the dependency.
An instance of the dependency.
What are the building blocks of a NestJS application called?
Modules
Components
Services
Controllers
Can a Controller access a Service's methods in NestJS?
No, Controllers and Services are completely isolated.
Yes, by using static methods of the Service.
Yes, by injecting the Service into the Controller's constructor.
Only if the Controller and Service are defined in the same module.
What is the primary programming language used for developing NestJS applications?
JavaScript
Python
Java
C#
What is a common use case for middleware in NestJS?
Defining API endpoints.
Implementing authentication and authorization logic.
Rendering HTML templates.
Generating database queries.
What is the order of execution for middleware applied at the controller and route level in NestJS?
Route-level middleware executes first, followed by controller-level middleware.
The order of execution is undefined.
Controller-level middleware executes first, followed by route-level middleware.
The order can be controlled using a priority setting.
Which of the following is NOT a valid HTTP method for defining routes in NestJS?
PUT
PATCH
DELETE
RENDER
What is the primary purpose of exception handling in a NestJS backend application?
To gracefully handle and respond to unexpected errors during request processing.
To handle database migrations and schema changes.
To define middleware functions for request-response cycles.
To enforce strict data typing in controller methods.
Which design pattern heavily influences the architecture of NestJS?
Factory
Observer
Dependency Injection
Singleton