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

Method onConnected

packages/lit-query/src/createQueryController.ts:135–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 }
134
135 protected onConnected(): void {
136 if (!this.syncClient()) {
137 return
138 }
139
140 this.refreshOptions()
141 this.subscribe()
142 this.observer?.updateResult()
143 if (this.observer) {
144 this.setObserverResult(this.observer.getCurrentResult())
145 }
146 }
147
148 protected onDisconnected(): void {
149 this.unsubscribeObserver()

Callers

nothing calls this directly

Calls 6

syncClientMethod · 0.95
refreshOptionsMethod · 0.95
subscribeMethod · 0.95
setObserverResultMethod · 0.95
updateResultMethod · 0.80
getCurrentResultMethod · 0.45

Tested by

no test coverage detected