# Toggle Task Completed

Use the `toggleTaskCompleted` mutation to toggle `is_completed` for a single task item.

### Required Argument

| Argument   | Required | Type                                                                                                             |
| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `keysHash` | True     | `keyHash` from the [journey query](https://docs.suggestic.com/graphql/query/queries/content/journey) `taskItem.` |

### Available Fields

The following fields will be part of the response.

| Field name | Type   | Description                                                                         |
| ---------- | ------ | ----------------------------------------------------------------------------------- |
| `sucess`   | String | **True** if a single task item has been completed. Otherwise, it displays **False** |
| `message`  | String | Description of the result                                                           |

### Example

{% tabs %}
{% tab title="Mutation" %}

```graphql
mutation {
  toggleTaskCompleted(
    keysHash: "d888ffa733e035c4b8d58a7564a75663"
    ) {
    success
    message
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "toggleTaskCompleted": {
      "success": true,
      "message": "is_completed: True"
    }
  }
}
```

{% endtab %}
{% endtabs %}
