class GitHub::GraphQL::Client
Constants
- VERSION
Public Class Methods
new(token: )
click to toggle source
# File lib/github/graphql/client.rb, line 21 def initialize(token: ) http = ::GitHub::GraphQL::Client::HTTP.new(token) schema = ::GraphQL::Client.load_schema(http) @client = ::GraphQL::Client.new(schema: schema, execute: http) @client.allow_dynamic_queries = true end
Public Instance Methods
query(query_string)
click to toggle source
# File lib/github/graphql/client.rb, line 29 def query(query_string) query = @client.parse(query_string) result = @client.query(query) result.data end