MCPcopy Create free account
hub / github.com/SvelteStack/svelte-query / onQueryUpdate

Method onQueryUpdate

src/queryCore/core/queryObserver.ts:715–729  ·  view source on GitHub ↗
(action: Action<TData, TError>)

Source from the content-addressed store, hash-verified

713 }
714
715 onQueryUpdate(action: Action<TData, TError>): void {
716 const notifyOptions: NotifyOptions = {}
717
718 if (action.type === 'success') {
719 notifyOptions.onSuccess = true
720 } else if (action.type === 'error' && !isCancelledError(action.error)) {
721 notifyOptions.onError = true
722 }
723
724 this.updateResult(notifyOptions)
725
726 if (this.hasListeners()) {
727 this.updateTimers()
728 }
729 }
730
731 private notify(notifyOptions: NotifyOptions): void {
732 notifyManager.batch(() => {

Callers 1

dispatchMethod · 0.80

Calls 4

updateResultMethod · 0.95
updateTimersMethod · 0.95
isCancelledErrorFunction · 0.90
hasListenersMethod · 0.80

Tested by

no test coverage detected