app/controllers/graphql_controller.rb
def prepare_variables(variables_param)
      case variables_param.presence
      when String
        JSON.parse(variables_param) || {}
      when ActionController::Parameters
        # GraphQL-Ruby will validate name and type of incoming variables.
        variables_param.to_unsafe_hash
      else
        {}
      end
    end
# Handle variables in form data, JSON body, or a blank value
Handle variables in form data, JSON body, or a blank value
Handle variables in form data JSON body or a blank value
def prepare_variables(variables_param)
      case variables_param.presence
      when String
        JSON.parse(variables_param) || {}
      when ActionController::Parameters
        variables_param.to_unsafe_hash
      else
        {}
      end
    end
def prepare_variables ( variables_param ) case variables_param . presence when String JSON . parse ( variables_param ) || { } when ActionController :: Parameters variables_param . to_unsafe_hash else { } end end
Handle variables in form data, JSON body, or a blank value
Handle variables in form data JSON body or a blank value
# GraphQL-Ruby will validate name and type of incoming variables.
variables_param