app/controllers/graphql_controller.rb
# This method handles all GraphQL requests that WDP-API receives.
#
# @see WDPAPISchema
# @return [void]
This method handles all GraphQL requests that WDP-API receives.
This method handles all GraphQL requests that WDP - API receives .
def execute
    variables = prepare_variables(params[:variables])
    query = params[:query]
    operation_name = params[:operationName]
    context = {
      current_user: @current_user,
    }
    result = WDPAPISchema.execute(query, variables: variables, context: context, operation_name: operation_name)
    render json: result
  rescue StandardError => e
    raise e unless Rails.env.development?
    handle_error_in_development e
  end
def execute variables = prepare_variables ( params [ :variables ] ) query = params [ :query ] operation_name = params [ :operationName ] context = { current_user : @current_user , } result = WDPAPISchema . execute ( query , variables : variables , context : context , operation_name : operation_name ) render json : result rescue StandardError => e raise e unless Rails . env . development? handle_error_in_development e end
This method handles all GraphQL requests that WDP-API receives.
This method handles all GraphQL requests that WDP - API receives .
# :nocov: # :nocov:
None
void
see
None