diff --git a/lib/apollo-federation/entities_field.rb b/lib/apollo-federation/entities_field.rb index 05eeb2ec0..c8843ef4c 100644 --- a/lib/apollo-federation/entities_field.rb +++ b/lib/apollo-federation/entities_field.rb @@ -71,7 +71,11 @@ def _entities(representations:) # calls return the same object, it might not have the right type # Right now, apollo-federation just adds a __typename property to the result, # but I don't really like the idea of modifying the resolved object - context[resolved_value] = type + if type.kind == GraphQL::TypeKinds::INTERFACE + context[resolved_value] = context.schema.resolve_type(type, resolved_value, context) + else + context[resolved_value] = type + end resolved_value end end