Skip to content

Commit

Permalink
fix: include generic actions in enum filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Mar 15, 2024
1 parent ae94fcd commit 51004af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/ash_graphql.ex
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,14 @@ defmodule AshGraphql do
|> Ash.Resource.Info.public_attributes()
|> Enum.concat(all_arguments(resource))
|> Enum.concat(Ash.Resource.Info.calculations(resource))
|> Enum.concat(
resource
|> Ash.Resource.Info.actions()
|> Enum.filter(&(&1.type == :action))
|> Enum.map(fn action ->
%{type: action.returns, constraints: action.constraints, name: action.name}
end)
)
|> Enum.reduce({[], already_checked}, fn %{type: type} = attr, {acc, already_checked} ->
if nested? do
constraints = Map.get(attr, :constraints, [])
Expand Down

0 comments on commit 51004af

Please sign in to comment.