Congrats on the project! However, I disagree with your base premise here. Having explicit functions is better for project clarity than “magic” that infers things and gives you a pretty one liner – this is exactly what Rails does with ActiveRecord (it’s got much less magical over the years though). Pulling in an external dependency to “solve” a non-problem creates even more complexity as people now need to be aware of how to work with an extra dependency.
Ecto provides us with composable queries out of the box which is already amazing, we don’t need to add another abstraction on top of that. If you need, have a Blog.PostQuery module where you add all of your queries and then compose with them on your Blog.Posts context. I do this extensively in this project: Base Module - Query Module and it feels very intuitive and most importantly – explicit.






















