File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
npm-packages/scenario-runner/convex Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ import { v } from "convex/values" ;
12import { components } from "./_generated/api" ;
23import { action , mutation , query } from "./_generated/server" ;
34
5+ export const CACHE_BREAKER_ARGS = { cacheBreaker : v . number ( ) } ;
6+
47export 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
1114export 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
1821export 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 } ) ;
You can’t perform that action at this time.
0 commit comments