MCPcopy Create free account
hub / github.com/TanStack/query / notify

Method notify

packages/query-core/src/queryCache.ts:362–368  ·  view source on GitHub ↗

* Notifies every cache listener of an event, in one batch. * @internal * @param event - The event passed to every listener.

(event: QueryCacheNotifyEvent)

Source from the content-addressed store, hash-verified

360 * @param event - The event passed to every listener.
361 */
362 notify(event: QueryCacheNotifyEvent): void {
363 notifyManager.batch(() => {
364 this.listeners.forEach((listener) => {
365 listener(event)
366 })
367 })
368 }
369
370 /**
371 * Calls {@link Query#onFocus} on every cached query, in one batch.

Callers 15

addMethod · 0.95
removeMethod · 0.95
setOptionsMethod · 0.45
updateResultMethod · 0.45
addObserverMethod · 0.45
removeObserverMethod · 0.45
#dispatchMethod · 0.45
addObserverMethod · 0.45

Calls 1

listenerFunction · 0.50

Tested by

no test coverage detected