kuon
2
To add some example, let’s say I use this pattern:
There is is, in this pattern added queries, like:
|> Accounts.filter_non_executive_users()
Now, where do I put the filter function “query compositor” if what I want to filter or preload lives in a different context?
Should I do:
Blog.list_posts(fn query ->
query
|> SocialMedia.preload_likes()
end)
And have preload_likes
be “smart enough” to figure if query is on post or comment?