MCPcopy Index your code
hub / github.com/simstudioai/sim / useDeleteWorkflowGroup

Function useDeleteWorkflowGroup

apps/sim/hooks/queries/tables.ts:2178–2196  ·  view source on GitHub ↗
({ workspaceId, tableId }: RowMutationContext)

Source from the content-addressed store, hash-verified

2176}
2177
2178export function useDeleteWorkflowGroup({ workspaceId, tableId }: RowMutationContext) {
2179 const queryClient = useQueryClient()
2180 return useMutation({
2181 mutationFn: async ({ groupId }: DeleteWorkflowGroupVariables) => {
2182 return requestJson(deleteWorkflowGroupContract, {
2183 params: { tableId },
2184 body: { workspaceId, groupId },
2185 })
2186 },
2187 onError: (error) => {
2188 if (isValidationError(error)) return
2189 toast.error(error.message, { duration: 5000 })
2190 },
2191 onSettled: () => {
2192 invalidateTableSchema(queryClient, tableId)
2193 queryClient.invalidateQueries({ queryKey: tableKeys.rowsRoot(tableId) })
2194 },
2195 })
2196}

Callers 1

TableGridFunction · 0.90

Calls 4

requestJsonFunction · 0.90
isValidationErrorFunction · 0.90
invalidateTableSchemaFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected