# Food Log Entries (Legacy)

The **`mealLog`** query retrieves a list of log entries for the authenticated user for a selected date range.

### Arguments

| Argument   | Required? | Type  | Description                                     |
| ---------- | --------- | ----- | ----------------------------------------------- |
| `fromDate` | True      | Date! | Starting filter date range, format `YYYY-mm-dd` |
| `toDate`   | True      | Date! | Ending filter date range, format `YYYY-mm-dd`   |

### Available Fields

| Field           | Type                                                  | Note                                                                                        |
| --------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `name`          | String                                                | Name of the logged item                                                                     |
| `date`          | Date                                                  | Date of the log entry                                                                       |
| `mealType`      | MealType                                              | Type of meal that was logged. RECIPE, MENU\_ITEM                                            |
| `servings`      | \[[servings](/graphql/objects/food-logs/servings.md)] | Object that contains predefined serving types and sizes                                     |
| `serving`       | Float                                                 | Index of the [**servings** ](/graphql/objects/food-logs/servings.md)element that was logged |
| `quantity`      | Float                                                 | Quantity of logged servings                                                                 |
| `servingWeight` | Float                                                 | Weight in grams of each serving                                                             |

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

```graphql
{
  mealLog(fromDate: "2020-01-01" toDate: "2020-01-21") {
    edges {
      node {
        name
        date
        mealType
        databaseId
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "mealLog": {
      "edges": [
        {
          "node": {
            "name": "Potato and Pesto Salad",
            "date": "2020-04-02",
            "mealType": "RECIPE",
            "id": "TWVhbExvZzphMjE4ZGUwMGY2M2MxMWViOWI3Y2FhMzExODg5ZmQwNw==",
            "databaseId": "a218de00f63c11eb9b7caa311889fd07"
          }
        },
        {
          "node": {
            "name": "avocado",
            "date": "2021-08-09",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzo4YjI2MzI2YWY5MzkxMWViYWQxYjZlNTQ2Y2RlZTZmNA==",
            "databaseId": "8b26326af93911ebad1b6e546cdee6f4"
          }
        },
        {
          "node": {
            "name": "Potato and Pesto Salad",
            "date": "2020-04-02",
            "mealType": "RECIPE",
            "id": "TWVhbExvZzoyM2QyMDg0MGZhMGMxMWViYmZkZWI2ODgyOTcwNzc1MA==",
            "databaseId": "23d20840fa0c11ebbfdeb68829707750"
          }
        },
        {
          "node": {
            "name": "My cool bacon eggs",
            "date": "2021-08-02",
            "mealType": "OWN_RECIPE",
            "id": "TWVhbExvZzoyYjJmYjYyNmYzYzkxMWViODI4NWZlNzZkZGYwNTk3Mg==",
            "databaseId": "2b2fb626f3c911eb8285fe76ddf05972"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-06",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzo5MmVlYjU3Y2Y2NGYxMWViOTM2NDhhNjdhMTU4ZTUxNA==",
            "databaseId": "92eeb57cf64f11eb93648a67a158e514"
          }
        },
        {
          "node": {
            "name": "avocado",
            "date": "2021-08-09",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzo4YjMwOTUzNGY5MzkxMWViOTU2N2NhZjI0OTc1ODNlMQ==",
            "databaseId": "8b309534f93911eb9567caf2497583e1"
          }
        },
        {
          "node": {
            "name": "My cool bacon eggs",
            "date": "2021-07-14",
            "mealType": "OWN_RECIPE",
            "id": "TWVhbExvZzpjMTRlMjNjMmU0YjUxMWViYTY1MWJlYTlmOTUzMzkyZQ==",
            "databaseId": "c14e23c2e4b511eba651bea9f953392e"
          }
        },
        {
          "node": {
            "name": "Potato and Pesto Salad",
            "date": "2020-04-02",
            "mealType": "RECIPE",
            "id": "TWVhbExvZzplZDk2OTA4Y2Y2MDIxMWViODgxYjU2NmE4NTZjYjZmYQ==",
            "databaseId": "ed96908cf60211eb881b566a856cb6fa"
          }
        },
        {
          "node": {
            "name": "avocado",
            "date": "2021-08-09",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzo4YjI2MjU5MGY5MzkxMWViYmRhOWEyNWU3NjkyMGUxNA==",
            "databaseId": "8b262590f93911ebbda9a25e76920e14"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-10",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzpkODViNTM5YWZhMDUxMWViYjgwNjkyZDk4M2U2YWRhMg==",
            "databaseId": "d85b539afa0511ebb80692d983e6ada2"
          }
        },
        {
          "node": {
            "name": "My cool bacon eggs",
            "date": "2021-08-02",
            "mealType": "OWN_RECIPE",
            "id": "TWVhbExvZzozZGFjYWUzNmYzYzgxMWViYThiMDU2OWNiZDg5MTIwMQ==",
            "databaseId": "3dacae36f3c811eba8b0569cbd891201"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-06",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzphMTQ5ZmUyNGY2NGYxMWViODU0NWQyZDczNDZiZTA2NQ==",
            "databaseId": "a149fe24f64f11eb8545d2d7346be065"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-06",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzo5MmYxMzkyOGY2NGYxMWViOWYzYmIyYjE3OWZmNjdkMQ==",
            "databaseId": "92f13928f64f11eb9f3bb2b179ff67d1"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-10",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzpkODVlYTJlOGZhMDUxMWViYjAxOGZhZmViNzUzYWZkNA==",
            "databaseId": "d85ea2e8fa0511ebb018fafeb753afd4"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-06",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzphMTRiNDE4MGY2NGYxMWViYTQ1ZWIyYjE3OWZmNjdkMQ==",
            "databaseId": "a14b4180f64f11eba45eb2b179ff67d1"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-06",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzphMTRkNTAyZWY2NGYxMWViOTM2NDhhNjdhMTU4ZTUxNA==",
            "databaseId": "a14d502ef64f11eb93648a67a158e514"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-06",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzo5MzAzODZkY2Y2NGYxMWViYWNmZmQyZDczNDZiZTA2NQ==",
            "databaseId": "930386dcf64f11ebacffd2d7346be065"
          }
        },
        {
          "node": {
            "name": "Powercrunch Protein bar",
            "date": "2021-08-10",
            "mealType": "OWN_ITEM",
            "id": "TWVhbExvZzpkODYyZjk5Y2ZhMDUxMWViYTRlOGU2NjU1YjM5NzE2ZQ==",
            "databaseId": "d862f99cfa0511eba4e8e6655b39716e"
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/query/queries/food-log/legacy/food-logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
