mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-19 21:03:09 +12:00
fix: properly interpolate action in conflict messages
This commit is contained in:
parent
e51bad36d5
commit
eac844186a
1 changed files with 15 additions and 1 deletions
|
@ -1937,7 +1937,21 @@ defmodule AshGraphql.Resource do
|
|||
"#{inspect(format_type(field.field.type))} - from #{inspect(field.source.resource)}'s identity: #{identity}"
|
||||
|
||||
field ->
|
||||
"#{inspect(format_type(field.field.type))} - from #{inspect(field.source.resource)}.#{field.source.action}"
|
||||
action =
|
||||
case field.source.action do
|
||||
%{name: name} -> name
|
||||
name -> name
|
||||
end
|
||||
|> then(fn action ->
|
||||
try do
|
||||
to_string(action)
|
||||
rescue
|
||||
_ ->
|
||||
inspect(action)
|
||||
end
|
||||
end)
|
||||
|
||||
"#{inspect(format_type(field.field.type))} - from #{inspect(field.source.resource)}.#{action}"
|
||||
end)
|
||||
|> Enum.uniq()
|
||||
|
||||
|
|
Loading…
Reference in a new issue