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

Method onConnected

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

Source from the content-addressed store, hash-verified

134 }
135
136 protected onConnected(): void {
137 if (!this.syncClient()) {
138 return
139 }
140
141 this.refreshOptions()
142 this.subscribe()
143 this.observer?.updateResult()
144 if (this.observer) {
145 this.setObserverResult(this.observer.getCurrentResult())
146 }
147 }
148
149 protected onDisconnected(): void {
150 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