From 5bd28cce16ad989687deda1ee7db6eaad7bab1a3 Mon Sep 17 00:00:00 2001 From: Barnabas Jovanovics Date: Tue, 3 Oct 2023 12:20:15 +0200 Subject: [PATCH 1/3] make the node in relay edges non-null --- lib/resource/resource.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/resource/resource.ex b/lib/resource/resource.ex index 8b1453c9..1f83cfbe 100644 --- a/lib/resource/resource.ex +++ b/lib/resource/resource.ex @@ -3103,7 +3103,9 @@ defmodule AshGraphql.Resource do module: schema, name: "node", __reference__: ref(__ENV__), - type: type + type: %Absinthe.Blueprint.TypeReference.NonNull{ + of_type: type + } } ], identifier: String.to_atom("#{type}_edge"), From 1f70a3a32173fa0f2b9c3e23ad7bd244c7ff917b Mon Sep 17 00:00:00 2001 From: Barnabas Jovanovics Date: Tue, 3 Oct 2023 12:41:13 +0200 Subject: [PATCH 2/3] make the edge non-null too --- lib/resource/resource.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/resource/resource.ex b/lib/resource/resource.ex index 1f83cfbe..8307be94 100644 --- a/lib/resource/resource.ex +++ b/lib/resource/resource.ex @@ -3134,7 +3134,9 @@ defmodule AshGraphql.Resource do name: "edges", __reference__: ref(__ENV__), type: %Absinthe.Blueprint.TypeReference.List{ - of_type: String.to_atom("#{type}_edge") + of_type: %Absinthe.Blueprint.TypeReference.List{ + of_type: String.to_atom("#{type}_edge") + } } } ] From d157fdd814b7e1f072831c380105becc529f0323 Mon Sep 17 00:00:00 2001 From: Barnabas Jovanovics Date: Tue, 3 Oct 2023 18:51:26 +0200 Subject: [PATCH 3/3] fix edge type --- lib/resource/resource.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resource/resource.ex b/lib/resource/resource.ex index 8307be94..14908bc9 100644 --- a/lib/resource/resource.ex +++ b/lib/resource/resource.ex @@ -3134,7 +3134,7 @@ defmodule AshGraphql.Resource do name: "edges", __reference__: ref(__ENV__), type: %Absinthe.Blueprint.TypeReference.List{ - of_type: %Absinthe.Blueprint.TypeReference.List{ + of_type: %Absinthe.Blueprint.TypeReference.NonNull{ of_type: String.to_atom("#{type}_edge") } }