Class: GitHub::GraphQL::Client::HTTP

Inherits:
GraphQL::Client::HTTP
  • Object
show all
Defined in:
lib/github/graphql/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ HTTP

Returns a new instance of HTTP.



11
12
13
14
# File 'lib/github/graphql/client.rb', line 11

def initialize(token)
  @token = token
  super(GitHub::GraphQL::URL)
end

Instance Method Details

#headers(context) ⇒ Object



16
17
18
# File 'lib/github/graphql/client.rb', line 16

def headers(context)
  context.merge({"Authorization" => "bearer #{@token}"})
end