GymClientOptions
Properties
Section titled “Properties”baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
API origin, e.g. https://gymgym.club. Omit in the browser to use the current origin.
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Custom fetch (tests, React Native, service bindings).
Parameters
Section titled “Parameters”RequestInfo | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
headers?
Section titled “headers?”
optionalheaders?:Record<string,string>
Extra headers on every API request.
onMutation?
Section titled “onMutation?”
optionalonMutation?: (operationName) =>void
Called after every successful mutation, e.g. to invalidate caches.
Parameters
Section titled “Parameters”operationName
Section titled “operationName”string
Returns
Section titled “Returns”void
storage?
Section titled “storage?”
optionalstorage?:QueueStorage
Where the offline queue persists; defaults to memory.
token?
Section titled “token?”
optionaltoken?:string| (() =>string|null|undefined)
Bearer token for clients without cookies (CLI, native apps). Read on every request.