Skip to content

Commit

Permalink
Prevent key :is_type_of not found error on interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Jun 2, 2021
1 parent 4b40f3d commit 1302be1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/absinthe/type/interface.ex
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ defmodule Absinthe.Type.Interface do
end
else
type_name =
Enum.find(implementors, fn type ->
implementors
|> Enum.filter(&match?(%Type.Object{}, &1))
|> Enum.find(fn type ->
Absinthe.Type.function(type, :is_type_of).(obj)
end)

Expand Down

0 comments on commit 1302be1

Please sign in to comment.