module Mirah::Graphql

Graphql provides the direct interface with the graphql client library and can be used directly to query Mirah endpoints. @private

Constants

DEFAULT_ENDPOINT
Schema
ValidationClient

In order to validate the queries in advance, we need a client, but we don't have an execution context, so we make a validation client to generate the query types.

Public Class Methods

create_client(host:) click to toggle source

Create a new Graphql client for the given endpoint, authenticating with the given details.

# File lib/mirah/graphql.rb, line 24
def self.create_client(host:)
  http = AuthorizedHttp.new(host + DEFAULT_ENDPOINT)
  GraphQL::Client.new(schema: Schema, execute: http)
end