# Water and Hydration

Use the `updateHydration` mutation to increase or decrease the number of cups of water tracked.

### **Required Arguments**

| Argument | Type | Note                                                                                                             |
| -------- | ---- | ---------------------------------------------------------------------------------------------------------------- |
| `date`   | Date | The date when the water entries will be counted. Use the format: `YYYY-MM-DD`                                    |
| `action` | Date | Add the **INCREASE** or **DECREASE** value to specify if the amount of cup of water is increasing or decreasing. |

### **Available Fields**

| Field     | Type    | Note                                                                                   |
| --------- | ------- | -------------------------------------------------------------------------------------- |
| `success` | Boolean | **true:** If the entry has been created successfully. Otherwise, it displays **false** |
| `message` | String  | The message returns either if the information has been updated or not.                 |

### Example <a href="#example" id="example"></a>

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

```javascript
curl -XPOST 'https://production.suggestic.com/graphql' \
  -H 'Authorization: Bearer <User-JWT>' \
  -H 'Content-Type: application/json' \
 --data-raw '{"query": "mutation { updateHydration(date:\"2020-10-13\",action: INCREASE) {success message}}}"
}'{ "Authorization": "Token ", "Suggestic-Partner":"" }
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
    "data": {
        "updateHydration": {
            "success": true,
            "message": "Hydration was successfully updated"
        }
    }
}
```

{% endtab %}
{% endtabs %}

### UI Example

<img src="https://920729701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwqSnBDpAb6mFZYLsuB%2Fuploads%2F0LfzSjRjlPx5ImaEfnD4%2Fimage.png?alt=media&#x26;token=fc44d111-5785-4cb8-8f96-6c00bd1e90d8" alt="" data-size="original">
