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

Function invalidateAndAwait

packages/vue/src/atomQuery.ts:128–135  ·  view source on GitHub ↗
(keys: ReadonlyArray<unknown>)

Source from the content-addressed store, hash-verified

126 if (atoms.length === 0) return
127 yield* Effect.forEach(atoms, (atom) => Effect.sync(() => defaultRegistry.refresh(atom)), {
128 discard: true
129 })
130 })
131 .pipe(Effect.orDie)
132
133/**
134 * Invalidate the given keys and AWAIT the result. `keyAtoms` resolves all matching hierarchical
135 * keys to a deduplicated set of query atoms. Refresh that set directly: sending the whole key set
136 * through `Reactivity.invalidate` invokes one atom's registered callback once per matching key,
137 * repeatedly superseding the same fetch when a mutation carries many row/prefix keys.
138 *

Callers 4

makeAtomHarnessFunction · 0.85
makeEnvFunction · 0.85

Calls 5

atomsForKeysFunction · 0.85
awaitAtomResultFunction · 0.85
forEachMethod · 0.65
invalidateMethod · 0.65
pipeMethod · 0.65

Tested by 2

makeAtomHarnessFunction · 0.68
makeEnvFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…