Class: Fbe::Graph::HTTP
- Inherits:
-
GraphQL::Client::HTTP
- Object
- GraphQL::Client::HTTP
- Fbe::Graph::HTTP
- Defined in:
- lib/fbe/github_graph.rb
Overview
HTTP transport class for GraphQL client to communicate with GitHub API
This class extends GraphQL::Client::HTTP to handle GitHub-specific authentication and endpoints.
Instance Method Summary collapse
-
#headers(_context) ⇒ Hash
Provides headers for GraphQL requests including authentication.
-
#initialize(token, host) ⇒ HTTP
constructor
Initializes a new HTTP transport with GitHub authentication.
Constructor Details
#initialize(token, host) ⇒ HTTP
Initializes a new HTTP transport with GitHub authentication.
459 460 461 462 |
# File 'lib/fbe/github_graph.rb', line 459 def initialize(token, host) @token = token super("https://#{host}/graphql") end |
Instance Method Details
#headers(_context) ⇒ Hash
Provides headers for GraphQL requests including authentication.
468 469 470 |
# File 'lib/fbe/github_graph.rb', line 468 def headers(_context) { Authorization: "Bearer #{@token}" } end |