Throughout this book, we have used the dependency graph as a way to discover potential issues. Here is how it looked when we started:
For a small service with only three endpoints, it's kind of complicated. From this graph, we also noticed that there were a lot of arrows pointing to the data, config, and logging packages.
Working under the assumption that more arrows going into or coming out of a package meant the more risk, complexity, and coupling, we set about trying to reduce these relationships.
The highest impact change was our adoption of the config injection, which included the definition of local config interfaces (as discussed in the previous section). This removed all of the arrows going into the config package, except for the one from main(), which we cannot remove.
Furthermore, during our config injection work, we also removed...