#
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:Name | Type |
---|---|
connectionParams | Record<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:Name | Type |
---|---|
opts | object |
opts.cacheKey? | string |
opts.events | SubscribeEvents | (ctx : { operationId : string ; query : string ; selections : Selection[] ; variables : undefined | Record<string, unknown> }) => SubscribeEvents |
opts.query | string |
opts.selections | Selection[] |
opts.variables | undefined | 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:Name | Type |
---|---|
selections | Selection[] | Set<Selection> |
Returns: Promise<string[]>
Defined in: packages/gqless/src/Client/client.ts:96