Writing composable queries in Ecto

In this article, I'll show you how to refactor your Ecto Queries by breaking them up. This example is from my side project where the below query fetches all the completed todos in the last 30 days for all users. def feed() do Repo.all from t in Todo, join:…