Writing your own Elixir pipe operator Distillery vs Exrm vs Relx

Self-referencing many-to-many relationships using Ecto

I’ve decided to do the backend for a new app I’m creating myself, using Elixir/Phoenix. I’ve been learning Elixir for the past few months and thought it would be a great opportunity to put what I’ve learned to good use.

There’s a lot of documentation about the new many_to_many macro in Ecto 2 — but somehow, it still was a bit of a pain to get this right the first time. I couldn’t find a concrete example of how a self-referencing many-to-many relationship would work with Ecto, and after some digging and the help of the awesome Elixir community, I got it working. I’m writing this post just to put this out there so you can go through this quicker.

Read here.