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
Name | Type |
---|---|
__namedParameters | DrupalStateConfig |
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
Name | Type | Default value | Description |
---|---|---|---|
endpoint | string | undefined | the assembled JSON:API endpoint |
res | boolean | ServerResponse <IncomingMessage > | false | response object |
anon | boolean | false | - |
Returns
Promise
<void
| TJsonApiBody
>
data fetched from JSON:API endpoint
Overrides
DrupalState.fetchData