# Interdependency amongst Contexts

**URL:** <https://forum.elixirforum.com/t/interdependency-amongst-contexts/31380>\
**Category:** Questions\
**Tags:** phoenix, contexts, unit-testing\
**Created:** [May 10, 2020, 1:40pm UTC](https://forum.elixirforum.com/t/interdependency-amongst-contexts/31380 "2020-05-10T13:40:46Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![LostKobrakai](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/32/3072_2.png) [@LostKobrakai](https://forum.elixirforum.com/u/LostKobrakai)\
**Post date:** [May 11, 2020, 8:11am UTC](https://forum.elixirforum.com/t/interdependency-amongst-contexts/31380/5 "2020-05-11T08:11:57Z")

</div>

> [@Qqwy](#):
>
> I believe that in many cases, as long as you are able to draw out your dependencies as a directed acyclic graph (in other words: there are no cycles, no contexts that both depend on each-other), then you are usually fine.

Very much this. Your context are unlikely all on the same level of abstraction, but you should always only depend on something of a lower level of abstraction. On recent elixir versions I’d try to get Boundary setup, which can help with such things and also bring more visibility in the otherwise hidden-in-implementation-details tree of dependencies.

> [@Boundary - enforcing boundaries in Elixir projects](https://forum.elixirforum.com/t/boundary-enforcing-boundaries-in-elixir-projects/24623):
>
> I’d like to announce a small library called boundaries. This is an experimental project which explores the idea of enforcing boundaries in Elixir projects without requiring the extra ceremony of umbrella apps. You can find a brief explanation on the [library repo](https://github.com/sasa1977/boundaries), while a more detailed doc is available [here](https://github.com/sasa1977/boundaries/blob/master/lib/mix/tasks/compile/boundaries.ex#L4). Note that this library is still in an exploratory phase, and I haven’t really tried it out myself yet. At this point I’m opening it primarily to collect the community feedback.

---

_[View the full topic](https://forum.elixirforum.com/t/interdependency-amongst-contexts/31380)._
