Ash.Api.destroy

You're seeing just the callback destroy, go back to Ash.Api module for more information.

Specs

destroy(Ash.Changeset.t() | Ash.Resource.record(), params :: Keyword.t()) ::
  :ok | {:error, term()}

Destroy a record.

  • :verbose? - Log engine operations (very verbose!) The default value is false.

  • :action - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :stacktraces? - For Ash errors, wether or not each error has a stacktrace. See the error_handling guide for more. The default value is true.

  • :tenant - A tenant to set on the query or changeset

  • :actor - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :return_notifications? - Use this if you're running ash actions in your own transaction and you want notifications to happen still.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.