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
Name | Type |
---|---|
T | Record <string , any > |
Parameters
Name | Type |
---|---|
request | GraphQLRequest |
Returns
Promise
<undefined
| null
| T
>
query
▸ query<T
>(request
): Promise
<T
>
Executes a GraphQL query and returns a promise with the result.
Type parameters
Name | Type |
---|---|
T | any |
Parameters
Name | Type |
---|---|
request | GraphQLRequest |
Returns
Promise
<T
>