()
| 26 | }; |
| 27 | |
| 28 | export function useCancelQuery() { |
| 29 | return useMutation({ |
| 30 | mutationKey: cancelQueryQueryKeys.all(), |
| 31 | mutationFn: async (params: CancelQueryParams) => { |
| 32 | return cancelQuery({ |
| 33 | params, |
| 34 | getConnectionIdFromSessionIdQueryKey: |
| 35 | cancelQueryQueryKeys.connectionIdFromSessionId(params), |
| 36 | cancelQueryQueryKey: cancelQueryQueryKeys.cancelQuery(params), |
| 37 | }); |
| 38 | }, |
| 39 | onError: (error, variables) => { |
| 40 | Sentry.captureException(error, { |
| 41 | extra: { variables }, |
| 42 | }); |
| 43 | }, |
| 44 | }); |
| 45 | } |
no test coverage detected