From 778effc8c175b3d002593204697d2c9c25be681b Mon Sep 17 00:00:00 2001 From: Barnabas Jovanovics Date: Mon, 13 May 2024 10:38:31 +0200 Subject: [PATCH] formatting --- test/alias_test.exs | 4 ++-- test/support/resources/post.ex | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/test/alias_test.exs b/test/alias_test.exs index ec965ab..877f98a 100644 --- a/test/alias_test.exs +++ b/test/alias_test.exs @@ -208,9 +208,9 @@ defmodule AliasTest do assert %{ errors: [ %{ - code: "forbidden_field", + code: "forbidden_field" } - ], + ] } = result end diff --git a/test/support/resources/post.ex b/test/support/resources/post.ex index e01cbad..c8fc63e 100644 --- a/test/support/resources/post.ex +++ b/test/support/resources/post.ex @@ -390,22 +390,21 @@ defmodule AshGraphql.Test.Post do calculations do calculate(:static_calculation, :string, AshGraphql.Test.StaticCalculation, public?: true) + calculate(:private_calculation, AshGraphql.Test.Embed, fn records, _ -> records - |> Enum.map( - fn %{private_attribute: true} -> + |> Enum.map(fn + %{private_attribute: true} -> %AshGraphql.Test.Embed{} - %{private_attribute: true} -> + + %{private_attribute: true} -> nil - end - ) + end) end) do - public? true - load :private_attribute + public?(true) + load(:private_attribute) end - - calculate(:full_text, :string, FullTextCalculation, public?: true) calculate(:text_1_and_2, :string, expr(text1 <> ^arg(:separator) <> text2)) do