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

Method notify

packages/query-core/src/mutationCache.ts:359–365  ·  view source on GitHub ↗

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

(event: MutationCacheNotifyEvent)

Source from the content-addressed store, hash-verified

357 * @param event - The event passed to every listener.
358 */
359 notify(event: MutationCacheNotifyEvent) {
360 notifyManager.batch(() => {
361 this.listeners.forEach((listener) => {
362 listener(event)
363 })
364 })
365 }
366
367 /**
368 * Continues every paused mutation, e.g. when the app comes back online.

Callers 3

addMethod · 0.95
removeMethod · 0.95
clearMethod · 0.95

Calls 1

listenerFunction · 0.50

Tested by

no test coverage detected