From 6fca1f02feb48f148e3ba3156ad43a90b085d5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Thu, 17 Nov 2016 17:23:57 +0100 Subject: [PATCH] Added clarifying comments related to GraphQL return types --- app/controllers/graphql_controller.rb | 2 ++ lib/graph_ql/type_creator.rb | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index f1f4795ae..e3bedceea 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -4,6 +4,8 @@ class GraphqlController < ApplicationController skip_authorization_check def query + # ConsulSchema.execute returns the query result in the shape of a Hash, which + # is sent back to the client rendered in JSON render json: ConsulSchema.execute( params[:query], variables: params[:variables] || {} diff --git a/lib/graph_ql/type_creator.rb b/lib/graph_ql/type_creator.rb index 848d92704..5a831fd7d 100644 --- a/lib/graph_ql/type_creator.rb +++ b/lib/graph_ql/type_creator.rb @@ -38,8 +38,7 @@ module GraphQL end end end - - return new_graphql_type + return new_graphql_type # GraphQL::ObjectType end end end