Skip to content

Commit

Permalink
fix: recurse through array types for union checking
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Aug 1, 2023
1 parent 700cc1a commit d5e8781
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ash_graphql.ex
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ defmodule AshGraphql do
end
end

defp nested_attrs({:array, type}, constraints, already_checked) do
nested_attrs(type, constraints[:items] || [], already_checked)
end

defp nested_attrs(Ash.Type.Union, constraints, already_checked) do
Enum.reduce(
constraints[:types] || [],
Expand Down

0 comments on commit d5e8781

Please sign in to comment.