From ab18f87192578da36fdea4d22a86a74241a8c1c6 Mon Sep 17 00:00:00 2001 From: Jeremy Grant Date: Mon, 10 Jul 2023 09:30:43 +1000 Subject: [PATCH] fix(array unions): for arrays of embedded types unions when graphql_unnested_unions is used, without it they return empty values --- lib/resource/resource.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/resource/resource.ex b/lib/resource/resource.ex index dfa60fe4..95072916 100644 --- a/lib/resource/resource.ex +++ b/lib/resource/resource.ex @@ -3474,6 +3474,9 @@ defmodule AshGraphql.Resource do end) end + defp middleware_for_field(resource, field, name, {:array, type}, constraints, api) do + middleware_for_field(resource, field, name, type, constraints, api) + end defp middleware_for_field(resource, field, name, type, constraints, api) do if Ash.Type.NewType.new_type?(type) && Ash.Type.NewType.subtype_of(type) == Ash.Type.Union &&