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
apiPrefix?
optional
apiPrefix:string
Set the JSON:API prefix.
- Default value:
/jsonapi
- Required: No
auth?
optional
auth:NextDrupalAuth
Override the default auth. You can use this to implement your own authentication mechanism.
debug?
optional
debug:boolean
Set debug to true to enable debug messages.
- Default value:
false
- Required: No
fetcher?
optional
fetcher:Fetcher
Override the default fetcher. Use this to add your own fetcher ex. axios.
- Default value:
fetch
- Required: No
frontPage?
optional
frontPage:string
Set the default frontPage.
- Default value:
/home
- Required: No
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
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
withAuth?
optional
withAuth:boolean
Set whether the client should use authenticated requests by default.
- Default value:
true
- Required: *No