Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ash: Support other actions than defaults #825

Open
Tracked by #823
Flo0807 opened this issue Jan 31, 2025 · 0 comments
Open
Tracked by #823

Ash: Support other actions than defaults #825

Flo0807 opened this issue Jan 31, 2025 · 0 comments

Comments

@Flo0807
Copy link
Collaborator

Flo0807 commented Jan 31, 2025

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
],
@Flo0807 Flo0807 mentioned this issue Jan 31, 2025
48 tasks
@Flo0807 Flo0807 changed the title Create additional adapter options for Ash to support other actions than defaults Ash: Support other actions than defaults Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant