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

Function emitFetch

packages/effect/src/ui/Query.ts:5635–5657  ·  view source on GitHub ↗
(
    entry: Entry,
    trigger: Trigger,
    restart: boolean,
    stored: boolean,
    page?: PageRef | undefined,
    parent?: queryCore.SpanContext | undefined,
    watcher?: string | undefined
  )

Source from the content-addressed store, hash-verified

5633 }
5634 }
5635 const emitFetch = (
5636 entry: Entry,
5637 trigger: Trigger,
5638 restart: boolean,
5639 stored: boolean,
5640 page?: PageRef | undefined,
5641 parent?: queryCore.SpanContext | undefined,
5642 watcher?: string | undefined
5643 ): void => {
5644 if (fetchListeners.size === 0) return
5645 notify(fetchListeners, {
5646 query: entry.def.name,
5647 logKey: logKeyOf(entry),
5648 trigger,
5649 restart,
5650 inWindow: inWindow(entry),
5651 stored,
5652 empty: entry.result === undefined || isBareFailure(entry.result),
5653 ...(watcher === undefined ? undefined : { watcher }),
5654 ...pageFields(page),
5655 ...spanFields(parent)
5656 })
5657 }
5658
5659 // -- idle timer -------------------------------------------------------------
5660 const cancelIdle = (entry: Entry): void => {

Callers 3

startFetchFunction · 0.85
runSharedFunction · 0.85
eventFunction · 0.85

Calls 6

logKeyOfFunction · 0.85
isBareFailureFunction · 0.85
pageFieldsFunction · 0.85
spanFieldsFunction · 0.85
notifyFunction · 0.70
inWindowFunction · 0.70

Tested by

no test coverage detected