Skip to main content

Interface: SubscriptionsClient#

Methods#

close#

â–¸ close(): Promise<void>

Returns: Promise<void>

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


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:98


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:79


unsubscribe#

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

Parameters:#

NameType
selectionsSelection[] | Set<Selection>

Returns: Promise<string[]>

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

Last updated on by PabloSzx