From 42355e770c77c58e52043b912243cb0d1441d256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Mon, 5 Dec 2016 18:42:17 +0100 Subject: [PATCH] Fixed bug related to wrong use of GraphQL::Relay connection helper --- lib/graph_ql/type_creator.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/graph_ql/type_creator.rb b/lib/graph_ql/type_creator.rb index b47624df9..a508c88d6 100644 --- a/lib/graph_ql/type_creator.rb +++ b/lib/graph_ql/type_creator.rb @@ -34,11 +34,11 @@ module GraphQL when :belongs_to field(association.name, -> { type_creator.created_types[association.klass] }) when :has_many - connection association.name, -> do - type_creator.created_types[association.klass].connection_type do - description "#{association.klass.model_name.human.pluralize}" - resolve -> (object, arguments, context) { association.klass.all } - end + connection( + association.name, + Proc.new { type_creator.created_types[association.klass].connection_type } + ) do + resolve -> (object, arguments, context) { association.klass.all } end end end