View Source Ash.Resource.ManualCreate behaviour (ash v2.4.21)

A module to implement manual create actions.

Link to this section Summary

Link to this section Types

@type context() :: %{actor: term(), tenant: term(), authorize?: term(), api: module()}

Link to this section Callbacks

Link to this callback

create( changeset, opts, context )

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