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

Add get step to Ash.Reactor #1886

Open
jimsynz opened this issue Mar 19, 2025 · 1 comment · May be fixed by #1888
Open

Add get step to Ash.Reactor #1886

jimsynz opened this issue Mar 19, 2025 · 1 comment · May be fixed by #1888
Labels
enhancement New feature or request needs review

Comments

@jimsynz
Copy link
Contributor

jimsynz commented Mar 19, 2025

As suggested by Zach, we should have a get step which can return a single value based on a list of attributes, much like the get code interface.

This should be fairly trivial to add.

Example

get :get_post, Post, :read do
  by [:id]
  inputs %{id: input(:post_id)}
end
@jimsynz jimsynz added enhancement New feature or request needs review labels Mar 19, 2025
@zachdaniel
Copy link
Contributor

One thing to keep in mind is that we need way to specify inputs to the action in addition the what is being got-by and they might not be the same thing

jimsynz added a commit that referenced this issue Mar 19, 2025
Provides a specific step type which filters by the keys in the `by`
option.  Behaves much the same as the Ash `get` code interface.

Closes #1886.
@jimsynz jimsynz linked a pull request Mar 19, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants