# Heart Rate

Use the `heartRateLogs` query to obtain the total records of the "heart rate log" logged by the user for the specified date range.

### Required Arguments

<table data-header-hidden><thead><tr><th></th><th width="219"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Description</td></tr><tr><td><code>start</code></td><td>Date!</td><td>The starting date of the defined date range. Use the format: <code>YYYY-MM-DD</code></td></tr><tr><td><code>end</code></td><td>Date!</td><td>The end date of the defined date range. Use the format: <code>YYYY-MM-DD</code></td></tr><tr><td><code>first</code></td><td>Int</td><td>Retrieves the first results from the list.</td></tr><tr><td><code>after</code></td><td>String</td><td> It takes the <em>cursor type</em> and retrieves results after that position.</td></tr><tr><td><code>id</code></td><td>ID</td><td>Id of desired tracking record.</td></tr><tr><td><code>source</code></td><td></td><td>Source of input, <strong>default</strong> is set to <strong>suggestic</strong>. enum SourceType { APPLE FITBIT GARMIN GOOGLEFIT_NATIVE GOOGLEFIT_REST HUAWEIHEALTH IHEALTH MISFIT OMRONCONNECT OMRONWELLNESS OURA POLAR SAMSUNG STRAVA SUGGESTIC SUUNTO WITHINGS }</td></tr></tbody></table>

### Available Fields

|             |              |                                                                                                                                                                                                                                            |
| ----------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Field Name  | Type         | Description                                                                                                                                                                                                                                |
| `id`        | Int!         | Id of the heart rate log.                                                                                                                                                                                                                  |
| `value`     | PositiveInt! | Heart rate registered value.                                                                                                                                                                                                               |
| `timestamp` | Float!       | Heart rate log timestamp `YYYY-MM-DDT hh:mm:ssZ`                                                                                                                                                                                           |
| `createdAt` | Int!         | Date the user logged their hear rate log `YYYY-MM-DDT hh:mm:ssZ`                                                                                                                                                                           |
| `source`    | DateTime!    | Source of input, **default** is set to **suggestic**. enum SourceType { APPLE FITBIT GARMIN GOOGLEFIT\_NATIVE GOOGLEFIT\_REST HUAWEIHEALTH IHEALTH MISFIT OMRONCONNECT OMRONWELLNESS OURA POLAR SAMSUNG STRAVA SUGGESTIC SUUNTO WITHINGS } |

### Example

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

```graphql
query {
  heartRateLogs(start:"2023-10-01" end:"2023-10-03" source:GARMIN){
    edges{
      node{
        value
        timestamp
        createdAt
        source
        id
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "heartRateLogs": {
      "edges": [
        {
          "node": {
            "value": 88,
            "timestamp": "2023-10-03T00:00:00Z",
            "createdAt": "2023-10-03T16:50:42Z",
            "source": "GARMIN",
            "id": "SGVhcnRSYXRlTG9nOjI0OTgyNDM="
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}
