# My Common Foods Search

Use the `myCommonFoods`to return the user's stored common foods. These common foods are the ones created by a user by using the [`createMyCommonFoods`](https://docs.suggestic.com/graphql/query/mutations/food-log/log-entries/create-my-common-foods) mutation.

&#x20;Use also an optional `ID` argument to search b64id foods.

## Available Argument

| Name | Type   | Description                             |
| ---- | ------ | --------------------------------------- |
| Id   | String | Unique Food ID. *No required argument.* |

### Available Fields

The following fields are part of the response.

| Field Name    | Type                                                                        | Description                                                                 |
| ------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `name`        | String                                                                      | Name of the common food                                                     |
| `description` | String                                                                      | Branded food description                                                    |
| `portions`    | [portions](https://docs.suggestic.com/graphql/objects/food-logs/portions)   | Represents the predefined portions per food.                                |
| `nutrients`   | [nutrients](https://docs.suggestic.com/graphql/objects/food-logs/nutrients) | Object that includes the information of the nutrients available in the food |

### Pagination

The `myCommonFoods` query supports the use of [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). The following fields can be used

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

```graphql
 pageInfo{
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
```

{% endtab %}
{% endtabs %}

## Examples

### GraphQL Example

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

```graphql
{
  myCommonFoods {
    edges {
      node {
        id
        name
        nutrients{
          name
          type
          unit
          amount
        }
      }
    }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "myCommonFoods": {
      "edges": [
        {
          "node": {
            "id": "TXlDb21tb25Gb29kOmUxTUZUWHdCRnhuZkRtOFZZMDRi",
            "name": "CALIFORNIA CHILE BLEND",
            "nutrients": [
              {
                "name": "Protein",
                "type": "PROTEIN",
                "unit": "G",
                "amount": 0.038
              },
              {
                "name": "Retinol",
                "type": "RETINOL",
                "unit": "G",
                "amount": 0.34
              }
            ]
          }
        },
        {
          "node": {
            "id": "TXlDb21tb25Gb29kOkFsTU1UWHdCRnhuZkRtOFZCa19Y",
            "name": "Crispy cake wih cinammon",
            "nutrients": [
              {
                "name": "Sugars, added",
                "type": "SUGARS_ADDED",
                "unit": "G",
                "amount": 0.01
              },
              {
                "name": "Lactose",
                "type": "LACTOSE",
                "unit": "G",
                "amount": 0.34
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% 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/search/food-search-for-food-log/my-common-foods-search.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.
