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

Function makeTanstackContext

packages/vue/test/dependencyInvalidation.test.ts:131–145  ·  view source on GitHub ↗
(queryClient: QueryClient)

Source from the content-addressed store, hash-verified

129 }
130})
131
132it("clearing read dependencies drops the query from derivation", () => {
133 const inventoryKey = ["$Inventory", "List", undefined]
134 setQueryReadDependencies(inventoryKey, new Set([repo]))
135 clearQueryReadDependencies(inventoryKey)
136 expect(getDerivedInvalidationKeys(new Set([repo]))).toEqual([])
137})
138
139it("derivation matches on both dependency type and name (repo vs signal)", () => {
140 const key = ["$Live", "Feed", undefined]
141 setQueryReadDependencies(key, new Set([DataDependencies.signal("Feed")]))
142 try {
143 // Same name but different type (repo "Feed") must NOT intersect a signal read.
144 expect(getDerivedInvalidationKeys(new Set([DataDependencies.repo("Feed")]))).toEqual([])
145 // Same type and name does intersect.
146 expect(getDerivedInvalidationKeys(new Set([DataDependencies.signal("Feed")]))).toEqual([key])
147 } finally {
148 clearQueryReadDependencies(key)

Callers 2

makeTanstackHarnessFunction · 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…