MCPcopy Create free account
hub / github.com/Effect-TS/effect / ensureFetch

Function ensureFetch

packages/effect/src/ui/Query.ts:5953–5968  ·  view source on GitHub ↗
(
    entry: Entry,
    trigger: Trigger,
    build: Build,
    parent?: queryCore.SpanContext | undefined,
    watcher?: string | undefined
  )

Source from the content-addressed store, hash-verified

5951 * made when the last live owner exits.
5952 */
5953 const ensureFetch = (
5954 entry: Entry,
5955 trigger: Trigger,
5956 build: Build,
5957 parent?: queryCore.SpanContext | undefined,
5958 watcher?: string | undefined
5959 ): void => {
5960 if (entry.fetch !== undefined || disposed || !fetches || offServer(entry.def)) return
5961 if (settleOnce && entry.result !== undefined) return
5962 if (hasLive(entry)) {
5963 holdBack(entry, trigger, watcher)
5964 if (parent !== undefined) entry.deferredParent = parent
5965 return
5966 }
5967 startFetch(entry, trigger, build, false, false, parent, watcher)
5968 }
5969 /** Ten restarts in a row with no settle between are reported, once. */
5970 const countRestart = (entry: Entry): void => {
5971 entry.restarts++

Callers 9

fireIntervalFunction · 0.85
watchFunction · 0.85
holdFunction · 0.85
getStoredFunction · 0.85
prefetchFunction · 0.85
invalidateEntryFunction · 0.85
settleRunEntryFunction · 0.85
closeWindowFunction · 0.85
edgePassFunction · 0.85

Calls 4

offServerFunction · 0.85
hasLiveFunction · 0.85
holdBackFunction · 0.85
startFetchFunction · 0.85

Tested by

no test coverage detected