# unregisterWorker

Audience: Programmer

Marks the calling worker's live signal subscriptions as stopped, e.g.

Marks the calling worker's live signal subscriptions as stopped, e.g. on a
clean shutdown. A stopped subscription is a hint, not a deletion: the router
ignores it while another worker holds running subscriptions on the same
workflow, and otherwise keeps routing to it until its TTL lapses. A later
registerWorkflowWithSignals from the worker clears the mark. Never touches
workflow rows. Idempotent.

**Served by:** [workflow](https://docs.pyck.cloud/latest/api/services/workflow.md)

## Arguments

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `workerID` | String! |  |  |

## Returns

[UnregisterWorkerPayload](https://docs.pyck.cloud/latest/api/types/unregisterworkerpayload.md)!

## Example

Marks the live signal subscriptions of a worker as stopped, for example on a clean shutdown, and returns how many it stopped.

```graphql
mutation UnregisterWorker($workerID: String!) {
  unregisterWorker(workerID: $workerID) {
    stopped
  }
}
```

**Variables**

```json
{
  "workerID": "<worker ID>"
}
```
