Skip to main content

Interface: SubscriptionsClient#

Methods#

close#

â–¸ close(): Promise<void>

Returns: Promise<void>

Defined in: packages/gqless/src/Client/client.ts:96


setConnectionParams#

â–¸ setConnectionParams(connectionParams: Record<string, unknown> | () => PossiblePromise<Record<string, unknown>>, restartClient?: boolean): void

Parameters:#

NameType
connectionParamsRecord<string, unknown> | () => PossiblePromise<Record<string, unknown>>
restartClient?boolean

Returns: void

Defined in: packages/gqless/src/Client/client.ts:97


subscribe#

â–¸ subscribe(opts: { cacheKey?: string ; events: SubscribeEvents | (ctx: { operationId: string ; query: string ; selections: Selection[] ; variables: undefined | Record<string, unknown> }) => SubscribeEvents ; query: string ; selections: Selection[] ; variables: undefined | Record<string, unknown> }): PossiblePromise<{ operationId: string ; unsubscribe: () => Promise<void> }>

Parameters:#

NameType
optsobject
opts.cacheKey?string
opts.eventsSubscribeEvents | (ctx: { operationId: string ; query: string ; selections: Selection[] ; variables: undefined | Record<string, unknown> }) => SubscribeEvents
opts.querystring
opts.selectionsSelection[]
opts.variablesundefined | Record<string, unknown>

Returns: PossiblePromise<{ operationId: string ; unsubscribe: () => Promise<void> }>

Defined in: packages/gqless/src/Client/client.ts:78


unsubscribe#

â–¸ unsubscribe(selections: Selection[] | Set<Selection>): Promise<string[]>

Parameters:#

NameType
selectionsSelection[] | Set<Selection>

Returns: Promise<string[]>

Defined in: packages/gqless/src/Client/client.ts:95

Last updated on by github-actions[bot]