Dependency Injection NestJS Interview Questions
6 curated dependency injection interview questions for NestJS — with short answers, detailed explanations, and interview tips. Ideal for Fresh through Tech Lead prep.
How does Nest's DI container resolve dependencies?
Fresh / InternConcept
Why forwardRef exists and when it's a smell?
JuniorBest Practice
Optional dependencies with @Optional() — use cases?
JuniorConcept
Constructor injection vs @Inject() property injection?
Mid-LevelComparison
Scenario: two implementations of the same interface for A/B payments.
SeniorScenario
Lead: how do you keep DI graphs understandable at 200+ providers?
SeniorArchitecture