From 0107ddce110918a9585c10ba5f457382e6cdcf6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Mon, 16 Jan 2017 11:24:02 +0100 Subject: [PATCH] Fix bug when resolving multiple associations --- lib/graph_ql/api_types_creator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graph_ql/api_types_creator.rb b/lib/graph_ql/api_types_creator.rb index 7e3b263fb..cf266d13f 100644 --- a/lib/graph_ql/api_types_creator.rb +++ b/lib/graph_ql/api_types_creator.rb @@ -54,7 +54,7 @@ module GraphQL when :multiple_association field_type = field_type.first 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