> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/mutations/updateworkflowsignal.md).

# Update Workflow Signal

updateWorkflowSignal Mutation

Updates an existing WorkflowSignal with new data.

## Arguments

| Name    | Type                         | Description                                            |
| ------- | ---------------------------- | ------------------------------------------------------ |
| `id`    | `ID!`                        | The unique identifier of the workflow signal to update |
| `input` | `UpdateWorkflowSignalInput!` | Input data for updating the workflow signal            |

## Return Type

`WorkflowSignal` - The updated workflow signal.

## Input Fields

`UpdateWorkflowSignalInput`:

| Field               | Type      | Description                                           |
| ------------------- | --------- | ----------------------------------------------------- |
| `dataTypeID`        | `UUID`    | Optional data type ID to associate with the signal    |
| `clearDataTypeID`   | `Boolean` | Clear the existing data type ID                       |
| `dataTypeSlug`      | `String`  | Optional data type slug                               |
| `clearDataTypeSlug` | `Boolean` | Clear the existing data type slug                     |
| `data`              | `Map`     | Custom data associated with the signal                |
| `clearData`         | `Boolean` | Clear the existing custom data                        |
| `eventName`         | `String`  | Name of the event that this signal handles            |
| `start`             | `Boolean` | Whether this signal can start a new workflow instance |
| `workflowID`        | `ID`      | ID of the workflow this signal belongs to             |

## Usage Example

```graphql
mutation {
  updateWorkflowSignal(
    id: "signal_456"
    input: {
      eventName: "inventory_critical_stock",
      start: true,
      data: {
        "description": "Enhanced signal for critical stock levels",
        "priority": "critical",
        "retry_policy": {
          "max_attempts": 5,
          "backoff_multiplier": 1.5
        },
        "timeout_seconds": 600,
        "required_fields": ["item_id", "current_quantity", "minimum_threshold", "critical_threshold"],
        "escalation_enabled": true,
        "auto_purchase_order": true
      },
      dataTypeSlug: "critical_inventory_signal"
    }
  ) {
    id
    eventName
    start
    data
    dataTypeSlug
    updatedAt
    updatedBy
    workflow {
      id
      name
      active
    }
  }
}
```

## JavaScript Example

```javascript
const UPDATE_WORKFLOW_SIGNAL = gql`
  mutation UpdateWorkflowSignal($id: ID!, $input: UpdateWorkflowSignalInput!) {
    updateWorkflowSignal(id: $id, input: $input) {
      id
      eventName
      start
      data
      dataTypeSlug
      updatedAt
      updatedBy
      workflow {
        id
        name
        active
      }
    }
  }
`;

const { data } = await client.mutate({
  mutation: UPDATE_WORKFLOW_SIGNAL,
  variables: {
    id: "signal_456",
    input: {
      eventName: "inventory_critical_stock",
      start: true,
      data: {
        description: "Enhanced signal for critical stock levels",
        priority: "critical",
        retry_policy: {
          max_attempts: 5,
          backoff_multiplier: 1.5
        },
        timeout_seconds: 600,
        required_fields: ["item_id", "current_quantity", "minimum_threshold", "critical_threshold"],
        escalation_enabled: true,
        auto_purchase_order: true
      },
      dataTypeSlug: "critical_inventory_signal"
    }
  }
});

console.log(`Updated workflow signal: ${data.updateWorkflowSignal.eventName}`);
```

## Important Notes

* Updating a workflow signal may affect how future events are handled
* Use the clear flags to explicitly remove optional fields
* The `data` field supports flexible JSON structures for signal configuration
* Changing the `eventName` will change which events trigger this signal
* Changing `start` from `true` to `false` prevents the signal from initiating new workflows
* Moving a signal to a different workflow can be done by updating the `workflowID`
* Consider the impact on existing workflow instances when making changes


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/mutations/updateworkflowsignal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
