Type Alias NextDrupalBaseOptions

NextDrupalBaseOptions: {
    accessToken?: AccessToken;
    apiPrefix?: string;
    auth?: NextDrupalAuth;
    debug?: boolean;
    fetcher?: Fetcher;
    frontPage?: string;
    headers?: HeadersInit;
    logger?: Logger;
    withAuth?: boolean;
}

Type declaration

  • OptionalaccessToken?: AccessToken

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

    • Default value: null
    • Required: No

    Documentation

  • OptionalapiPrefix?: string

    Set the JSON:API prefix.

    • Default value: /jsonapi
    • Required: No

    Documentation

  • Optionalauth?: NextDrupalAuth

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

    Documentation

  • Optionaldebug?: boolean

    Set debug to true to enable debug messages.

    • Default value: false
    • Required: No

    Documentation

  • Optionalfetcher?: Fetcher

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

    • Default value: fetch
    • Required: No

    Documentation

  • OptionalfrontPage?: string

    Set the default frontPage.

    • Default value: /home
    • Required: No

    Documentation

  • Optionalheaders?: HeadersInit

    Set custom headers for the fetcher.

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

    Documentation

  • Optionallogger?: Logger

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

    • Default value: console
    • Required: No

    Documentation

  • OptionalwithAuth?: boolean

    Set whether the client should use authenticated requests by default.

    • Default value: true
    • Required: *No

    Documentation