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

Function useUpdateWorkflowGroup

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

Source from the content-addressed store, hash-verified

2152}
2153
2154export function useUpdateWorkflowGroup({ workspaceId, tableId }: RowMutationContext) {
2155 const queryClient = useQueryClient()
2156 return useMutation({
2157 mutationFn: async (vars: UpdateWorkflowGroupVariables) => {
2158 return requestJson(updateWorkflowGroupContract, {
2159 params: { tableId },
2160 body: { workspaceId, ...vars },
2161 })
2162 },
2163 onError: (error) => {
2164 if (isValidationError(error)) return
2165 toast.error(error.message, { duration: 5000 })
2166 },
2167 onSettled: () => {
2168 invalidateTableSchema(queryClient, tableId)
2169 queryClient.invalidateQueries({ queryKey: tableKeys.rowsRoot(tableId) })
2170 },
2171 })
2172}
2173
2174interface DeleteWorkflowGroupVariables {
2175 groupId: string

Callers 3

TableGridFunction · 0.90
EnrichmentConfigFunction · 0.90
WorkflowSidebarBodyFunction · 0.90

Calls 4

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

Tested by

no test coverage detected