Last active
October 11, 2016 23:50
-
-
Save RyanCCollins/82973378a7ac9bcdc2b25b06759ee705 to your computer and use it in GitHub Desktop.
GraphQL, Rails, React: https://medium.com/@ryancollinsio/building-a-full-on-graphql-app-b261f6cfea93#.qtjma57sx
This file contains hidden or 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 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