Added clarifying comments related to GraphQL return types
This commit is contained in:
@@ -4,6 +4,8 @@ class GraphqlController < ApplicationController
|
|||||||
skip_authorization_check
|
skip_authorization_check
|
||||||
|
|
||||||
def query
|
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(
|
render json: ConsulSchema.execute(
|
||||||
params[:query],
|
params[:query],
|
||||||
variables: params[:variables] || {}
|
variables: params[:variables] || {}
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ module GraphQL
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return new_graphql_type # GraphQL::ObjectType
|
||||||
return new_graphql_type
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user