Interface: GraphQLClientConfig
Defined in: client/GraphQLClient.ts:80
Configuration for the GraphQL client.
Properties
apiKey?
optionalapiKey?:string
Defined in: client/GraphQLClient.ts:84
Standard API key — only used in direct mode.
clientId?
optionalclientId?:string
Defined in: client/GraphQLClient.ts:96
Client identifier for proxy mode (sent as X-Client-ID).
debug?
optionaldebug?:boolean
Defined in: client/GraphQLClient.ts:98
Enable debug logging (default: false). Gates all internal console output.
defaultLanguage?
optionaldefaultLanguage?:string
Defined in: client/GraphQLClient.ts:112
Default language tag (ISO 639-1, e.g. 'NL', 'EN'). When set, services and
helpers that take an optional language parameter fall back to this value.
Pass an explicit language to override per call.
endpoint
endpoint:
string
Defined in: client/GraphQLClient.ts:82
API endpoint URL — direct external API or proxy endpoint.
getAccessToken?
optionalgetAccessToken?:AccessTokenProvider
Defined in: client/GraphQLClient.ts:106
Resolver for the auth access token used in proxy mode. Called on every
request. Defaults to reading localStorage['access_token'] in the
browser, undefined elsewhere. Supply a custom resolver to integrate with
SSR (Next.js cookies, getServerSession), in-memory token stores, or
refresh flows.
headers?
optionalheaders?:Record<string,string>
Defined in: client/GraphQLClient.ts:88
Additional headers attached to every request.
orderEditorApiKey?
optionalorderEditorApiKey?:string
Defined in: client/GraphQLClient.ts:86
Order Editor API key — only used in direct mode for mutations in orderEditorMutations.
orderEditorMutations?
optionalorderEditorMutations?:string[]
Defined in: client/GraphQLClient.ts:118
Mutation names that should be sent with orderEditorApiKey instead of
apiKey in direct mode. Defaults to a built-in list of order-editor
mutations. Override to add custom mutations without an SDK upgrade.
proxyEndpoint?
optionalproxyEndpoint?:string
Defined in: client/GraphQLClient.ts:94
Proxy endpoint for secure mode — falls back to endpoint if not provided.
securityMode?
optionalsecurityMode?:"proxy"|"direct"
Defined in: client/GraphQLClient.ts:92
Security mode: 'proxy' (recommended) or 'direct' (legacy, exposes API keys client-side).
throwOnPartialErrors?
optionalthrowOnPartialErrors?:boolean
Defined in: client/GraphQLClient.ts:128
When the server returns a partial GraphQL response (data present
alongside errors — the normal GraphQL contract), runOperation and the
service methods built on it return the data and, by default, only surface
the errors via the debug log. Set this to true to instead throw a
GraphQLOperationError on any partial-error response, so server-reported
problems can't be silently rendered. Defaults to false (backward
compatible). The low-level client.execute() never throws regardless.
timeout?
optionaltimeout?:number
Defined in: client/GraphQLClient.ts:90
Request timeout in milliseconds (default 30000).