DiffoExample.Changes.Relate (DiffoExample v0.2.2)

Copy Markdown View Source

After-action for :relate-style update actions on Diffo Instance resources.

Applies the :relationships argument via Relationship.relate_instance, then reloads the instance through its primary read so preparations re-run.

Use it on any instance update action that carries argument :relationships, {:array, :struct}:

update :relate do
  argument :relationships, {:array, :struct}
  change DiffoExample.Changes.Relate
end