Skip to content

Instantly share code, notes, and snippets.

@Humoud
Created March 14, 2017 09:47
Show Gist options
  • Save Humoud/1a2da6c7f52c8163a5f2e6a12f4405bb to your computer and use it in GitHub Desktop.
Save Humoud/1a2da6c7f52c8163a5f2e6a12f4405bb to your computer and use it in GitHub Desktop.
class GraphqlController < ApplicationController
skip_before_action :verify_authenticity_token
def query
result_hash = Schema.execute(params[:query], variables: params[:variables])
render json: result_hash
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment