Created controller and route to answer GraphQL queries

This commit is contained in:
Alberto Miedes Garcés
2016-09-28 12:47:07 +02:00
parent df5caea56f
commit ab333d6627
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
class GraphqlController < ApplicationController
def query
#puts "I'm the GraphqlController inside the #query action!!"
render json: ConsulSchema.execute(
params[:query],
variables: params[:variables] || {}
)
end
end