How to address the issue with limits on preloaded associations using Ecto?

You can limit the number of associations with a preload query.

Another example.