# User Symptoms

Use the `userSymptoms` query to retrieve the logs of all the symptoms registered by the user.

### Required Arguments

| Argument | Type      | Description                                                           |
| -------- | --------- | --------------------------------------------------------------------- |
| `start`  | DateTime! | The starting date for the date range. Use the format: `YYYY-MM-DD`    |
| `end`    | DateTime! | The end date for the date range. Use the format: `YYYY-MM-DD`         |
| `id`     | ID        | Symptom log Id.                                                       |
| `first`  | Int       | Max number of entries retrieved.                                      |
| `after`  | String    | It takes the *cursor type* and retrieves results after that position. |

### Available Fields

| Field Name  | Type     | Description                                                                  |
| ----------- | -------- | ---------------------------------------------------------------------------- |
| `id`        | ID       | Symptom Log Id.                                                              |
| `symptomId` | ID       | Symptom Id.                                                                  |
| `symptom`   | Symptom  | [Symptom](https://docs.suggestic.com/graphql/objects/symptoms/symptom).      |
| `intensity` | Int      | Numeric value provided by the user to describe the intensity of the symptom. |
| `timestamp` | DateTime | Date entered by the user for when the symptom occurred.                      |
| `notes`     | String   | User-provided information about the symptom, e.g., trigger, duration, etc.   |
| `createdAt` | DateTime | Date when the symptom was registered.                                        |
| `updatedAt` | DateTime | Date when the symptom was last updated.                                      |

### Example

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

```graphql
query{
  userSymptoms(start:"2025-07-02" end:"2025-07-04" first: 10){
    pageInfo{
      startCursor
      endCursor
    }
    edges{
      node{
        id
        symptomId
        symptom{
          id
          name
          categories{
            id
            name
          }
        }
        intensity
        timestamp
        notes
        createdAt
        updatedAt
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "userSymptoms": {
      "pageInfo": {
        "startCursor": "T2Zmc2V0OjA=",
        "endCursor": "T2Zmc2V0Ojk="
      },
      "edges": [
        {
          "node": {
            "id": "U3ltcHRvbUxvZzoyNTQ=",
            "symptomId": "U3ltcHRvbTozNGNlYjBkZC05ZTg4LTQ0OWYtODcwNC05ZjJlMmU2MGRiNDE=",
            "symptom": {
              "id": "U3ltcHRvbTozNGNlYjBkZC05ZTg4LTQ0OWYtODcwNC05ZjJlMmU2MGRiNDE=",
              "name": "Bloating",
              "categories": [
                {
                  "id": "U3ltcHRvbUNhdGVnb3J5OjBiZDUzNTg5LWVjMDYtNGU0Ni1hMjQzLTc3MTQ1OTU0NjZmNA==",
                  "name": "Gastrointestinal"
                },
                {
                  "id": "U3ltcHRvbUNhdGVnb3J5OjY3NWJmNTEyLWQyZmEtNGZhYi04ZWQwLTAxNWE2ODQ3ZWQ4MA==",
                  "name": "Most Common"
                }
              ]
            },
            "intensity": 3,
            "timestamp": "2025-07-03T22:06:00Z",
            "notes": "After eating X I got bloated.",
            "createdAt": "2025-07-04T23:06:12Z",
            "updatedAt": "2025-07-04T23:06:12Z"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}
