Skip to main content

Class: EventHandler#

Constructors#

constructor#

+ new EventHandler(): EventHandler

Returns: EventHandler

Properties#

hasFetchSubscribers#

• hasFetchSubscribers: boolean= false

Defined in: packages/gqless/src/Events/index.ts:32


onCacheChangeListeners#

• Private onCacheChangeListeners: Set<OnCacheChangeEventFn>

Defined in: packages/gqless/src/Events/index.ts:35


onFetchListeners#

• Private onFetchListeners: Set<OnFetchEventFn>

Defined in: packages/gqless/src/Events/index.ts:33

Methods#

onCacheChangeSubscribe#

â–¸ onCacheChangeSubscribe(fn: OnCacheChangeEventFn): function

Parameters:#

NameType
fnOnCacheChangeEventFn

Returns: () => void

Defined in: packages/gqless/src/Events/index.ts:48


onFetchSubscribe#

â–¸ onFetchSubscribe(fn: OnFetchEventFn): function

Parameters:#

NameType
fnOnFetchEventFn

Returns: () => void

Defined in: packages/gqless/src/Events/index.ts:58


sendCacheChange#

â–¸ sendCacheChange(data: CacheChangeEventData): void

Parameters:#

NameType
dataCacheChangeEventData

Returns: void

Defined in: packages/gqless/src/Events/index.ts:37


sendFetchPromise#

â–¸ sendFetchPromise(data: Promise<FetchEventData>, selections: Selection[]): void

Parameters:#

NameType
dataPromise<FetchEventData>
selectionsSelection[]

Returns: void

Defined in: packages/gqless/src/Events/index.ts:41

Last updated on by PabloSzx