Skip to main content

Class: DrupalState

Configures DrupalState to integrate with a Decoupled Drupal CMS on Pantheon

See

DrupalStateConfig for the full list parameters

Hierarchy

  • DrupalState

    DrupalState

Constructors

constructor

new DrupalState(__namedParameters)

Parameters

NameType
__namedParametersDrupalStateConfig

Overrides

DrupalState.constructor

Defined in

drupal-kit/src/lib/PantheonDrupalState.ts:14

Methods

fetchData

fetchData(endpoint, res?, anon?): Promise<void | TJsonApiBody>

If a query is provided, fetches data using apollo-link-json-api, otherwise uses out fetch method.

Parameters

NameTypeDefault valueDescription
endpointstringundefinedthe assembled JSON:API endpoint
resboolean | ServerResponse<IncomingMessage>falseresponse object
anonbooleanfalse-

Returns

Promise<void | TJsonApiBody>

data fetched from JSON:API endpoint

Overrides

DrupalState.fetchData

Defined in

drupal-kit/src/lib/PantheonDrupalState.ts:42