()
| 301 | } |
| 302 | |
| 303 | export function useRunBenchmark() { |
| 304 | const queryClient = useQueryClient(); |
| 305 | |
| 306 | return useMutation({ |
| 307 | mutationFn: ({ id, req }: { id: string; req?: RunBenchmarkRequest }) => |
| 308 | api.runBenchmark(id, req), |
| 309 | onSuccess: (_, variables) => { |
| 310 | queryClient.invalidateQueries({ queryKey: queryKeys.benchmarks }); |
| 311 | queryClient.invalidateQueries({ queryKey: queryKeys.benchmark(variables.id) }); |
| 312 | }, |
| 313 | }); |
| 314 | } |
| 315 | |
| 316 | export function useDeleteBenchmark() { |
| 317 | const queryClient = useQueryClient(); |
no test coverage detected