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.



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

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

Instance Method Details

#headers(_context) ⇒ Object



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

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