Skip to content

Commit 049493b

Browse files
NicolappsConvex, Inc.
authored andcommitted
load generator: fix scenarios (#43517)
GitOrigin-RevId: ebac0d547d08638b426ebc86fdd1068e24990813
1 parent 47a7d88 commit 049493b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

npm-packages/scenario-runner/convex/components.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1+
import { v } from "convex/values";
12
import { components } from "./_generated/api";
23
import { action, mutation, query } from "./_generated/server";
34

5+
export const CACHE_BREAKER_ARGS = { cacheBreaker: v.number() };
6+
47
export const componentQuery = query({
5-
args: {},
8+
args: CACHE_BREAKER_ARGS,
69
handler: async (ctx) => {
710
return await ctx.runQuery(components.counterComponent.public.load);
811
},
912
});
1013

1114
export const componentMutation = mutation({
12-
args: {},
15+
args: CACHE_BREAKER_ARGS,
1316
handler: async (ctx) => {
1417
return await ctx.runMutation(components.counterComponent.public.increment);
1518
},
1619
});
1720

1821
export const componentAction = action({
19-
args: {},
22+
args: CACHE_BREAKER_ARGS,
2023
handler: async (ctx) => {
2124
const count = Math.floor(Math.random() * 4) + 1;
2225
await ctx.runAction(components.counterComponent.public.reset, { count });

0 commit comments

Comments
 (0)