AshArcadic.Changes.DestroyEdge (AshArcadic v0.1.0)

Copy Markdown View Source

Ash change that removes a graph edge from the action's record to a destination named by an argument, after the vertex write, inside the action's transaction.

change {AshArcadic.Changes.DestroyEdge, edge: :author, to: :author_id}

An edge that matched nothing (already gone or out of the source's tenant scope) returns Ash.Error.Changes.StaleRecord so Ash rolls the vertex back; DB errors are redacted. nil/empty to: removes no edge and the action still succeeds.