MCPcopy
hub / github.com/TanStack/query / add

Method add

packages/query-core/src/queryCache.ts:133–142  ·  view source on GitHub ↗
(query: Query<any, any, any, any>)

Source from the content-addressed store, hash-verified

131 }
132
133 add(query: Query<any, any, any, any>): void {
134 if (!this.#queries.has(query.queryHash)) {
135 this.#queries.set(query.queryHash, query)
136
137 this.notify({
138 type: 'added',
139 query,
140 })
141 }
142 }
143
144 remove(query: Query<any, any, any, any>): void {
145 const queryInMap = this.#queries.get(query.queryHash)

Callers 13

buildMethod · 0.95
createBaseQueryFunction · 0.45
injectMutationFunction · 0.45
withDevtoolsFunction · 0.45
trackPropMethod · 0.45
shouldNotifyListenersMethod · 0.45
subscribeMethod · 0.45

Calls 1

notifyMethod · 0.95

Tested by

no test coverage detected