Skip to main content

Class: GraphQLClientFactory

Creates instances of graphql-request GraphQLClient with the given options.

Params

endpoint - A WordPress GraphQL endpoint.

Params

options - A RequestConfig object.

Constructors

constructor

new GraphQLClientFactory(endpoint, options?)

Parameters

NameType
endpointstring
options?RequestConfig

Defined in

packages/wordpress-kit/src/lib/GraphQLClientFactory.ts:18

Properties

endpoint

endpoint: string

A WordPress GraphQL endpoint

Defined in

packages/wordpress-kit/src/lib/GraphQLClientFactory.ts:12


options

options: RequestConfig

RequestOptions

Defined in

packages/wordpress-kit/src/lib/GraphQLClientFactory.ts:16

Methods

create

create(): GraphQLClient

Creates an instance of graphql-request GraphQLClient based on the endpoint and options

Returns

GraphQLClient

Defined in

packages/wordpress-kit/src/lib/GraphQLClientFactory.ts:34