Module: GQLi::Github

Defined in:
lib/gqli/clients/github.rb

Overview

Module for creating a Github GraphQL client

Class Method Summary collapse

Class Method Details

.create(access_token, validate_query: true) ⇒ Object

Creates a Github GraphQL client



7
8
9
10
11
12
13
14
15
# File 'lib/gqli/clients/github.rb', line 7

def self.create(access_token, validate_query: true)
  GQLi::Client.new(
    'https://api.github.com/graphql',
    headers: {
      'Authorization' => "Bearer #{access_token}"
    },
    validate_query: validate_query
  )
end