Diffo.Provider.Changes.Relate (Diffo v0.4.1)

Copy Markdown View Source

After-action change for the standard :relate pattern.

Creates relationships from the :relationships argument on the changeset via Relationship.relate_instance/2, then reloads the result via the resource's primary :read action.

Usage

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