You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: graphql_client.rb
    path of file: ./repos/braintree_ruby/lib/braintree
    
    the code of the file until where you have to start completion: module Braintree
  class GraphQLClient < Http

    def initialize(config)
      @config = config
      @graphql_headers = {
        "Accept" => "applicati
    
    def query(definition, variables = {}, operationName = nil)
      graphql_connection = _setup_connection(@config.graphql_server, @config.graphql_port)

      request = {}
      request["query"] = definition
      request["operationName"] = operationName if operationName
      request["variables"] = variables

      response = _http_do Net::HTTP::Post, @config.graphql_base_url, request.to_json, nil, graphql_connection, @graphql_headers
      data = _parse_response(response)
      Util.raise_exception_for_graphql_error(data)

      data
    end