Skip to content

Ash: Support other actions than defaults #825

@Flo0807

Description

@Flo0807

We need a way to configure other actions than defaults. Users should be able to configure the Ash action being used for destroying, reading and updating items. We also need a way of passing additional inputs as well as options to Ash functions, e.g., to provide the actor of the action.

We might create additional adapter options for the ash adapter that can be configured by users to return the action, input, and a list of options.

adapter_config: [
  resource: Demo.Helpdesk.Ticket,
  # returns a tuple with action name, inputs and options passed to the `update` action
  delete_all: fn assigns -> {:mydestroy, %{foo: "bar"}, actor: assigns.current_user} end
],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions