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

Function makeQueryFamily

packages/vue/src/query.ts:531–541  ·  view source on GitHub ↗
(_getRuntime: () => Context.Context<R>, getAtomRt: () => AtomClientRuntime)

Source from the content-addressed store, hash-verified

529 readonly live?: boolean | LiveQueryOptions
530 readonly invalidation?: QueryInvalidationMode
531 }
532): Atom.Atom<AsyncResult.AsyncResult<A, E>> =>
533 withQueryOptions(atom, normalizeQueryOptions(options), queryKeyForAtom(atom))
534
535const observedStreamAtom = <A, E>(
536 atom: Atom.Writable<Atom.PullResult<A, E>, void>,
537 options?: AtomStreamQueryOptions
538): Atom.Writable<Atom.PullResult<A, E>, void> => {
539 let next = atom
540 const refetchInterval = options?.refreshEvery ?? options?.refetchInterval
541 if (refetchInterval !== undefined) next = Atom.withRefresh(refetchInterval)(next)
542 const gcTime = options?.idleTTL ?? options?.gcTime
543 if (gcTime === "infinity") return Atom.keepAlive(next)
544 if (gcTime !== undefined) return Atom.setIdleTTL(next, gcTime)

Callers 1

constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…