Options
All
  • Public
  • Public/Protected
  • All
Menu

Implementation of GraphClient using Apollo Client.

Hierarchy

  • ApolloGraphClient

Implements

Index

Constructors

constructor

  • Create a new GraphClient

    Parameters

    • endpoint: string

      GraphQL endpoint

    • Default value headers: any = {}

      any special headers to use

    • Default value fetch: WindowOrWorkerGlobalScope["fetch"] = buildAxiosFetch(axios.create(configureProxy({})))

      configured GlobalFetch instance to use for this GraphClient

    • Default value listeners: GraphClientListener[] = []

    Returns ApolloGraphClient

Properties

Readonly client

client: ApolloClient<any>

Configured Apollo Client instance subclasses can use directly

Readonly endpoint

endpoint: string

GraphQL endpoint

Private Readonly fetch

fetch: WindowOrWorkerGlobalScope["fetch"]

configured GlobalFetch instance to use for this GraphClient

Private Readonly headers

headers: any

any special headers to use

Private Readonly listeners

listeners: GraphClientListener[]

Methods

Private executeMutation

  • executeMutation<T, Q>(m: string, variables?: Q, mutationOptions?: any): Promise<any>

Private executeQuery

  • executeQuery<T, Q>(q: string, variables?: Q, queryOptions?: any): Promise<T>

mutate

query

  • query<T, Q>(options: QueryOptions<Q> | string): Promise<T>

Generated using TypeDoc