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

Method add

src/queryCore/core/queryCache.ts:109–118  ·  view source on GitHub ↗
(query: Query<any, any, any, any>)

Source from the content-addressed store, hash-verified

107 }
108
109 add(query: Query<any, any, any, any>): void {
110 if (!this.queriesMap[query.queryHash]) {
111 this.queriesMap[query.queryHash] = query
112 this.queries.push(query)
113 this.notify({
114 type: 'queryAdded',
115 query,
116 })
117 }
118 }
119
120 remove(query: Query<any, any, any, any>): void {
121 const queryInMap = this.queriesMap[query.queryHash]

Callers 2

buildMethod · 0.95
setActiveLinkFunction · 0.45

Calls 1

notifyMethod · 0.95

Tested by

no test coverage detected