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

Function makeTanstackContext

packages/vue/test/query-span.test.ts:33–47  ·  view source on GitHub ↗
(queryClient: QueryClient)

Source from the content-addressed store, hash-verified

31)
32
33function makeTanstackContext(queryClient: QueryClient) {
34 const app = createApp({ render: () => null })
35 app.use(VueQueryPlugin, { queryClient })
36 const scope = effectScope(true)
37 const run = <T>(fn: () => T): T => {
38 let out!: T
39 app.runWithContext(() => {
40 scope.run(() => {
41 out = fn()
42 })
43 })
44 return out
45 }
46 return { run, dispose: () => scope.stop() }
47}
48
49it("passes the current parent span through legacy TanStack refetch", async () => {
50 const queryClient = new QueryClient({

Callers 1

query-span.test.tsFile · 0.70

Calls 1

useMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…