Added clarifying comments related to GraphQL return types

This commit is contained in:
Alberto Miedes Garcés
2016-11-17 17:23:57 +01:00
parent 36bdad8851
commit 6fca1f02fe
2 changed files with 3 additions and 2 deletions

View File

@@ -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] || {}

View File

@@ -38,8 +38,7 @@ module GraphQL
end
end
end
return new_graphql_type
return new_graphql_type # GraphQL::ObjectType
end
end
end