Skip to content

Instantly share code, notes, and snippets.

@RyanCCollins
Last active October 11, 2016 23:50
Show Gist options
  • Save RyanCCollins/82973378a7ac9bcdc2b25b06759ee705 to your computer and use it in GitHub Desktop.
Save RyanCCollins/82973378a7ac9bcdc2b25b06759ee705 to your computer and use it in GitHub Desktop.
class ApiController < ApplicationController
def create
query_string = params[:query]
query_variables = ensure_hash(params[:variables])
result = MeetupEventPlannerSchema.execute(
query_string,
variables: query_variables,
context: { }
)
render json: result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment