MCPcopy Create free account
hub / github.com/effect-app/libs / setQueryReadDependencies

Function setQueryReadDependencies

packages/vue/src/dependencyMetadata.ts:11–18  ·  view source on GitHub ↗
(
  key: ReadonlyArray<unknown>,
  reads: DataDependencies.DataDependencies
)

Source from the content-addressed store, hash-verified

9const readDependencies = new Map<number, Entry>()
10export type QueryInvalidationMode = "await" | "soft"
11type InvalidationModeEntry = { awaitSubscribers: number; softSubscribers: number }
12const invalidationModes = new Map<number, InvalidationModeEntry>()
13
14export const registerQueryInvalidationMode = (
15 key: ReadonlyArray<unknown>,
16 mode: QueryInvalidationMode
17): () => void => {
18 const hash = Hash.hash(key)
19 const entry = invalidationModes.get(hash) ?? { awaitSubscribers: 0, softSubscribers: 0 }
20 if (mode === "soft") entry.softSubscribers++
21 else entry.awaitSubscribers++

Callers 4

trackReadDependenciesFunction · 0.90
buildQueryFamilyFunction · 0.90
useQueryFunction · 0.90

Calls 1

setMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…