I have noticed that there is a convention that when creating functions (Especially ecto related ones) the first argument is a struct. I was wondering why is this the case instead of just passing in the id?
I understand that if you already have the item loaded it makes sense but I find myself usually needing to call Items.get(id) first before something like Items.update(item_struct, params).
This happens especially why I try and use iex for local testing.