# discardWorkflowDraft

Discard the workflow's current DRAFT version, if any. Idempotent: a no-op when there is no draft.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "discardWorkflowDraft", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `workflowGroupId`: `ID!` (required)

## Response (data, an example)

```json
{
  "workflowAutomationsMutation": {
    "discardWorkflowGroupDraft": {
      "id": "<ID>",
      "name": "…",
      "status": "DRAFT",
      "pendingDraft": {
        "id": "<ID>"
      }
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "discardWorkflowDraft",
    "variables": {
      "workflowGroupId": "<workflowGroupId>"
    }
  }'
```
