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 RequestInit object. PatchedRequestInit

Constructors

constructor

new GraphqlClientFactory(endpoint, options?)

Parameters

NameType
endpointstring
optionsPatchedRequestInit

Defined in

packages/wordpress-kit/src/lib/graphqlClient/GraphqlClientFactory.ts:18

Properties

endpoint

endpoint: string

A WordPress GraphQL endpoint

Defined in

packages/wordpress-kit/src/lib/graphqlClient/GraphqlClientFactory.ts:12


options

options: PatchedRequestInit

PatchedRequestInit

Defined in

packages/wordpress-kit/src/lib/graphqlClient/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/graphqlClient/GraphqlClientFactory.ts:34