Class: Stardust::GraphQLController
- Inherits:
-
ActionController::API
- Object
- ActionController::API
- Stardust::GraphQLController
- Defined in:
- app/controllers/stardust/graphql_controller.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/stardust/graphql_controller.rb', line 4 def execute result = nil around_execute do result = GraphQL::Schema.execute( query, variables: variables, context: context, operation_name: operation_name ) end render json: result rescue StandardError => e raise e unless Rails.env.development? handle_error_in_development e end |