lib/graphql/introspection/interfaces_field.rb in graphql-1.0.0 vs lib/graphql/introspection/interfaces_field.rb in graphql-1.1.0

- old
+ new

@@ -1,4 +1,10 @@ GraphQL::Introspection::InterfacesField = GraphQL::Field.define do type -> { types[!GraphQL::Introspection::TypeType] } - resolve ->(target, a, c) { target.kind.object? ? target.interfaces : nil } + resolve ->(target, a, ctx) { + if target.kind == GraphQL::TypeKinds::OBJECT + ctx.warden.interfaces(target) + else + nil + end + } end