Class: Fbe::Graph::HTTP

Inherits:
GraphQL::Client::HTTP
  • Object
show all
Defined in:
lib/fbe/github_graph.rb

Overview

The HTTP class

Instance Method Summary collapse

Constructor Details

#initialize(token, host) ⇒ HTTP

Returns a new instance of HTTP.



121
122
123
124
# File 'lib/fbe/github_graph.rb', line 121

def initialize(token, host)
  @token = token
  super("https://#{host}/graphql")
end

Instance Method Details

#headers(_context) ⇒ Object



126
127
128
# File 'lib/fbe/github_graph.rb', line 126

def headers(_context)
  { Authorization: "Bearer #{@token}" }
end