fix: index many-to-many query invalidation

This commit is contained in:
DongHyeonka
2026-08-01 23:17:09 +09:00
parent 853c2e3f30
commit 73a50426d6
18 changed files with 574 additions and 325 deletions
+5 -5
View File
@@ -223,12 +223,12 @@ describe("scope-bound query commit fence", () => {
it("binds the namespace-first V2 query key", () => {
const scope = scopeSnapshot();
const definition = {
definitionId: "reference-detail-v1",
definitionId: "resource-detail-v1",
definitionVersion: 1,
owner: "platform-test",
namespace: "reference-resource",
namespace: "resource",
namespaceVersion: 1,
operationId: "GET_REFERENCE_RESOURCE",
operationId: "GET_RESOURCE",
profileId: "DETAIL_STANDARD" as const,
measureResult: measureOne,
execute: async () => ({ ok: true as const, value: "value" }),
@@ -239,7 +239,7 @@ describe("scope-bound query commit fence", () => {
expect(bound.queryKey).toEqual([
"query",
2,
"reference-resource",
"resource",
1,
"scope-fingerprint-0001",
1,
@@ -247,7 +247,7 @@ describe("scope-bound query commit fence", () => {
]);
expect(bound.queryKey.slice(0, 4)).toEqual(
createQueryInvalidationPrefix(
defineQueryNamespaceIdentity("reference-resource", 1),
defineQueryNamespaceIdentity("resource", 1),
),
);
});