Class: GraphQL::Rails::SchemaController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- GraphQL::Rails::SchemaController
- Includes:
- ControllerExtensions
- Defined in:
- app/controllers/graphql/rails/schema_controller.rb
Instance Method Summary collapse
-
#execute ⇒ Object
Execute a GraphQL query against the current schema.
Methods included from ControllerExtensions
Instance Method Details
#execute ⇒ Object
Execute a GraphQL query against the current schema.
15 16 17 18 19 20 21 |
# File 'app/controllers/graphql/rails/schema_controller.rb', line 15 def execute render json: Schema.instance.execute( params[:query], variables: to_hash(params[:variables]), context: context ) end |