Created
March 14, 2017 09:47
-
-
Save Humoud/1a2da6c7f52c8163a5f2e6a12f4405bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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