diff --git a/test/support/resources/channel/channel.ex b/test/support/resources/channel/channel.ex index dfb95bf4..535739c5 100644 --- a/test/support/resources/channel/channel.ex +++ b/test/support/resources/channel/channel.ex @@ -34,16 +34,22 @@ defmodule AshGraphql.Test.Channel do end calculations do - calculate(:direct_channel_messages, {:array, AshGraphql.Test.MessageUnion}, fn record, - %{ - api: api - } -> - record = api.load!(record, :messages) - - {:ok, - record.messages - |> Enum.map(&%Ash.Union{type: AshGraphql.Test.MessageUnion.struct_to_name(&1), value: &1})} - end) + calculate( + :direct_channel_messages, + {:array, AshGraphql.Test.MessageUnion}, + fn record, + %{ + api: api + } -> + record = api.load!(record, :messages) + + {:ok, + record.messages + |> Enum.map( + &%Ash.Union{type: AshGraphql.Test.MessageUnion.struct_to_name(&1), value: &1} + )} + end + ) calculate :indirect_channel_messages, AshGraphql.Test.PageOfChannelMessages,