mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-19 21:03:09 +12:00
improvement: handle nil
parent
This commit is contained in:
parent
896d5c8df3
commit
e16592f592
1 changed files with 7 additions and 0 deletions
|
@ -2442,6 +2442,13 @@ defmodule AshGraphql.Graphql.Resolver do
|
|||
end
|
||||
end
|
||||
|
||||
def resolve_attribute(
|
||||
%{source: nil} = resolution,
|
||||
_
|
||||
) do
|
||||
Absinthe.Resolution.put_result(resolution, {:ok, nil})
|
||||
end
|
||||
|
||||
defp resolve_union_result(value, data) when is_list(value) do
|
||||
Enum.map(value, &resolve_union_result(&1, data))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue