> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/queries/lab-tests/historical-results-by-biomarker.md).

# Historical Results by Biomarker

Use query `historicalResultsByBiomarker` to retrieve all historical values for a specific biomarker.

### Available Arguments

| Argument        | Type | Description                  |
| --------------- | ---- | ---------------------------- |
| `id`            | ID   | Id of the biomarker.         |
| `results.start` | date | Use the format: `YYYY-MM-DD` |
| `results.end`   | date | Use the format: `YYYY-MM-DD` |

### Available Fields

| Field Name                 | Type                       | Description                                                                                                                                                    |
| -------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `results`                  | ProfileBiomarkerConnection |                                                                                                                                                                |
| `results.id`               | ID                         | id of the profile biomarker.                                                                                                                                   |
| `results.date`             | datetime                   | Use the format: `YYYY-MM-DDT hh:mm:ssZ`                                                                                                                        |
| `results.value`            | GenericScalar              | <p>The <code>GenericScalar</code> scalar type represents a generic GraphQL scalar value that could be: String, Boolean, </p><p>Int, Float, List or Object.</p> |
| `results.displayValue`     | String                     | Optional display value                                                                                                                                         |
| `results.createdAt`        | datetime                   | Use the format: `YYYY-MM-DDT hh:mm:ssZ`                                                                                                                        |
| `results.updatedAt`        | datetime                   | Use the format: `YYYY-MM-DDT hh:mm:ssZ`                                                                                                                        |
| `biomarker`                |                            |                                                                                                                                                                |
| `biomarker.id`             | ID                         | Id of biomarker.                                                                                                                                               |
| `biomarker.name`           | String                     | Name of biomarker.                                                                                                                                             |
| `articles`                 | articles                   | Article recommendations.                                                                                                                                       |
| `articles.id`              | ID                         | Article recommendation ID.                                                                                                                                     |
| `articles.title`           | String                     | Article recommendation title.                                                                                                                                  |
| `articles.sourceUrl`       | String                     | Article recommendation source URL.                                                                                                                             |
| `articles.imageUrl`        | String                     | Article recommendation image URL.                                                                                                                              |
| `articles.categories.name` | String                     | Article recommendation category name.                                                                                                                          |
| `articles.categories.id`   | ID                         | Article recommendation category id.                                                                                                                            |

### Example

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

```graphql
query historicalResultsByBiomarker {
  historicalResultsByBiomarker(id: "QmlvbWFya2VyOjE=") {
    biomarker { id name }
    results(start: "2022-10-01", end: "2022-12-15") {
      edges {
        node {
          id
          date
          value
          createdAt
          updatedAt
          alert
          alertText
        }
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "historicalResultsByBiomarker": {
      "biomarker": {
        "id": "QmlvbWFya2VyOjE=",
        "name": "Diabetes Risk Index"
      },
      "results": {
        "edges": [
          {
            "node": {
              "id": "UHJvZmlsZUJpb21hcmtlcjox",
              "date": "2022-12-12T00:00:00+00:00",
              "value": {
                "type": "number",
                "value": 10
              },
              "createdAt": "2022-12-12T15:00:11.571707+00:00",
              "updatedAt": "2022-12-12T15:00:11.571728+00:00",
              "alert": true,
              "alertText": "Sample Text",
            }
          },
          {
            "node": {
              "id": "UHJvZmlsZUJpb21hcmtlcjoy",
              "date": "2022-10-01T00:00:00+00:00",
              "value": {
                "type": "number",
                "value": 10
              },
              "createdAt": "2022-12-12T15:08:54.903325+00:00",
              "updatedAt": "2022-12-12T15:08:54.903339+00:00",
              "alert": false
            }
          }
        ]
      }
    }
  }
```

{% endtab %}
{% endtabs %}

### Example with Article recommendations

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

```graphql
query historicalResultsByBiomarker {
  historicalResultsByBiomarker(id: "QlvbWFyc2VyOgU2") {
    articles{
        edges{
            node{
                id
                title
                categories{
                    name
                }
                sourceUrl
                imageUrl
            }
        }
    }
    biomarker { 
        id 
        name
        }
    results(start: "2025-01-01", end: "2025-04-10") {
      edges {
        node {
          id
          date
          value
          createdAt
          updatedAt
          alert
          alertText
        }
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
    "data": {
        "historicalResultsByBiomarker": {
            "articles": {
                "edges": [
                    {
                        "node": {
                            "id": "Q29udGVudExpYnJhcnk6ZjNiN1QwMDEtMWVmMC00MjYyLThmOMgtMjhlM2M3ODY5MGQ1",
                            "title": "Example 1",
                            "categories": [
                                {
                                    "name": "Test"
                                }
                            ],
                            "sourceUrl": "URL",
                            "imageUrl": "URL"
                        }
                    }
                ]
            },
            "biomarker": {
                "id": "QmlvbWFya2VyOjU2",
                "name": "HR"
            },
            "results": {
                "edges": [
                    {
                        "node": {
                            "id": "UHJvZmlsZUJpb31hcmtlcjo1ODkx",
                            "date": "2025-04-09T00:00:00+00:00",
                            "value": {
                                "type": "number",
                                "value": 121
                            },
                            "createdAt": "2025-04-09T20:40:48.458537+00:00",
                            "updatedAt": "2025-04-09T20:40:48.458550+00:00",
                            "alert": false,
                            "alertText": null
                        }
                    }
                ]
            }
```

{% endtab %}
{% endtabs %}
