View Source Ash.Resource.ManualUpdate behaviour (ash v2.15.0)

A module to implement manual update actions.

Summary

Types

@type context() :: %{
  optional(:actor) => term(),
  optional(:tenant) => term(),
  optional(:authorize?) => boolean(),
  optional(:api) => module(),
  optional(any()) => any()
}

Callbacks

Link to this callback

update(changeset, opts, context)

View Source
@callback update(
  changeset :: Ash.Changeset.t(),
  opts :: Keyword.t(),
  context :: context()
) ::
  {:ok, Ash.Resource.record()}
  | {:ok, Ash.Resource.record(),
     %{notifications: [Ash.Notifier.Notification.t()]}}
  | {:error, term()}