File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -944,12 +944,21 @@ defmodule AshGraphql do
944944 attributes
945945 |> Enum . filter ( & AshGraphql.Resource . define_type? ( & 1 . type , & 1 . constraints ) )
946946 |> Enum . flat_map ( fn attribute ->
947+ { type , constraints } =
948+ case attribute . type do
949+ { :array , type } ->
950+ { type , attribute . constraints [ :items ] || [ ] }
951+
952+ type ->
953+ { type , attribute . constraints }
954+ end
955+
947956 attribute = % {
948- type:
949- attribute . type
950- |> unwrap_type ( )
951- |> Ash.Type.NewType . subtype_of ( ) ,
952- constraints: Ash.Type.NewType . constraints ( attribute . type , attribute . constraints )
957+ attribute
958+ | type:
959+ type
960+ |> Ash.Type.NewType . subtype_of ( ) ,
961+ constraints: Ash.Type.NewType . constraints ( type , constraints )
953962 }
954963
955964 case unwrap_type ( attribute . type ) do
You can’t perform that action at this time.
0 commit comments