# Add Sleep Quality Score

Use the `addSleepQualityScore` sleep quality index scaling from 0 to 100.

### **Required Arguments**

| Argument | Type | Note                                                                                                                                             |
| -------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `date`   | Date | The date when the sleep quality score will be counted. Use the format: `YYYY-MM-DD`                                                              |
| `value`  | Int! | Sleep quality index scaling from 0 to 100, where the values above 77 signify good sleep quality, while those below 77 signify poor sleep quality |

### **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" %}

```graphql
mutation {
  addSleepQualityScore (value: 80, date: "2022-08-11") {
    success
    message
  }
}
```

{% endtab %}

{% tab title="Headers" %}

```graphql
{
  "Authorization": "Bearer <insert_your_token_here>"
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "addExerciseEntry": {
      "success": true,
      "message": "Sleep Quality Score added"
    }
  }
}
```

{% endtab %}
{% endtabs %}
