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

Function makeResolvedAtomQueryInvalidator

packages/vue/src/makeClient.ts:708–725  ·  view source on GitHub ↗
(getContext: () => Context.Context<R>)

Source from the content-addressed store, hash-verified

706 ]
707
708const makeResolvedAtomQueryInvalidator = <R>(getContext: () => Context.Context<R>): QueryInvalidator => {
709 let reactivity: Context.Service.Shape<typeof Reactivity.Reactivity> | undefined
710 const getReactivity = () => {
711 if (reactivity !== undefined) return reactivity
712 const service = Context.getOrUndefined(getContext(), Reactivity.Reactivity)
713 if (service === undefined) {
714 throw new Error("Reactivity service is missing from the client runtime")
715 }
716 return reactivity = service
717 }
718
719 return {
720 invalidateAndAwait: (keys) =>
721 invalidateAndAwait(keys).pipe(
722 Effect.provideService(Reactivity.Reactivity, getReactivity())
723 ),
724 invalidateSoft: (keys) =>
725 invalidateSoft(keys).pipe(
726 Effect.provideService(Reactivity.Reactivity, getReactivity())
727 )
728 }

Callers 1

makeClientFunction · 0.85

Calls 3

invalidateAndAwaitFunction · 0.90
getReactivityFunction · 0.85
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…