Skip to main content

Class: GraphQLClient

A GraphQL client that can be used to query and mutate data.

Methods

mutate

mutate<T>(request): Promise<undefined | null | T>

Executes a GraphQL mutation and returns a promise with the result.

Type parameters

NameType
TRecord<string, any>

Parameters

NameType
requestGraphQLRequest

Returns

Promise<undefined | null | T>


query

query<T>(request): Promise<T>

Executes a GraphQL query and returns a promise with the result.

Type parameters

NameType
Tany

Parameters

NameType
requestGraphQLRequest

Returns

Promise<T>