next-drupal / NextDrupalBaseOptions

Type Alias: NextDrupalBaseOptions

NextDrupalBaseOptions: object

Defined in: packages/next-drupal/src/types/next-drupal-base.ts:3

Type declaration

accessToken?

optional accessToken: AccessToken

A long-lived access token you can set for the client.

  • Default value: null
  • Required: No

Documentation

apiPrefix?

optional apiPrefix: string

Set the JSON:API prefix.

  • Default value: /jsonapi
  • Required: No

Documentation

auth?

optional auth: NextDrupalAuth

Override the default auth. You can use this to implement your own authentication mechanism.

Documentation

debug?

optional debug: boolean

Set debug to true to enable debug messages.

  • Default value: false
  • Required: No

Documentation

fetcher?

optional fetcher: Fetcher

Override the default fetcher. Use this to add your own fetcher ex. axios.

  • Default value: fetch
  • Required: No

Documentation

frontPage?

optional frontPage: string

Set the default frontPage.

  • Default value: /home
  • Required: No

Documentation

headers?

optional headers: HeadersInit

Set custom headers for the fetcher.

  • Default value: { "Content-Type": "application/vnd.api+json", Accept: "application/vnd.api+json" }
  • Required: No

Documentation

logger?

optional logger: Logger

Override the default logger. You can use this to send logs to a third-party service.

  • Default value: console
  • Required: No

Documentation

withAuth?

optional withAuth: boolean

Set whether the client should use authenticated requests by default.

  • Default value: true
  • Required: *No

Documentation