NestJS · Middle · Question 18 of 75

How do you resolve a circular dependency between two providers?

Explanation

Cycles usually mean responsibilities are mixed. Extracting the shared logic into a third provider is the cleaner fix.

Further reading

Problem with a question

NestJS · Middle · question 18

Test yourself

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

Take this quiz