Fix bug when resolving multiple associations

This commit is contained in:
Alberto Miedes Garcés
2017-01-16 11:24:02 +01:00
parent cb0a477d88
commit 0107ddce11

View File

@@ -54,7 +54,7 @@ module GraphQL
when :multiple_association when :multiple_association
field_type = field_type.first field_type = field_type.first
connection(field_name, -> { api_types_creator.created_types[field_type].connection_type }) do connection(field_name, -> { api_types_creator.created_types[field_type].connection_type }) do
resolve -> (object, arguments, context) { field_type.public_for_api } resolve -> (object, arguments, context) { field_type.public_for_api & object.send(field_name) }
end end
end end
end end