# Meal Planner (deprecated)

{% hint style="warning" %}
This query will soon be deprecated you should probably use [Meal Plan](https://docs.suggestic.com/graphql/query/queries/meal-plan-1) instead
{% endhint %}

The **mealPlannerByDay** query returns a meal plan that consists of 28 [recipes ](/graphql/objects/recipe.md)composed of 4 meals per day for a 7-day period.

The query results are organized by day number (**day1, day2, etc)** with each day containing 4 [recipes](/graphql/objects/recipe.md) for each of the following meals: **breakfast**, **snack**, **lunch** and **dinner.**

#### Example of mealPlannerbyDay Query

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

```graphql
{
  mealPlannerByDay(mealPlannerQueryType: SUGGESTIONS) {
    day1 {
      programDate
      breakfast {
        name
      }
      snack {
        name
      }
      lunch {
        name
      }
      dinner {
        name
      }
    }
    day2 {
      programDate
      breakfast {
        name
      }
      snack {
        name
      }
      lunch {
        name
      }
      dinner {
        name
      }
    }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "mealPlannerByDay": {
      "day1": {
        "programDate": "2019-12-24",
        "breakfast": [
          {
            "name": "Nut Butter With Peaches And Seeds"
          }
        ],
        "snack": [
          {
            "name": "Healthy Trail Mix"
          }
        ],
        "lunch": [
          {
            "name": "Chicken With Veggies"
          }
        ],
        "dinner": [
          {
            "name": "Salmon Salad Power Bowl"
          }
        ]
      },
      "day2": {
        "programDate": "2019-12-25",
        "breakfast": [
          {
            "name": "Nut Butter With Peaches And Seeds"
          }
        ],
        "snack": [
          {
            "name": "Healthy Trail Mix"
          }
        ],
        "lunch": [
          {
            "name": "Chicken With Veggies"
          }
        ],
        "dinner": [
          {
            "name": "Salmon Salad Power Bowl"
          }
        ]
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

## By Custom Format

The `mealPlannerByCustomFormat` query unlike `mealPlannerByDay` can be used to retrieve a custom format of meal times for example 2 snacks for a day.

| Argument | Required | Description                                                                                        |
| -------- | -------- | -------------------------------------------------------------------------------------------------- |
| `format` | True     | Available meal time options: \[BREAKFAST, SNACK, LUNCH, DINNER]. multiple options can be requested |

#### Example:

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

```graphql
{
  mealPlannerByCustomFormat(format: [BREAKFAST, SNACK, LUNCH, SNACK, DINNER]) {
    day1 {
      programDate
      mealTime
      recipe {
        name
      }
    }
    day2 {
      mealTime
      recipe {
        name
      }
    }
    day3 {
      mealTime
      recipe {
        name
      }
    }
  }
}


```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "mealPlannerByCustomFormat": {
      "day1": [
        {
          "programDate": "2020-01-21",
          "mealTime": "breakfast",
          "recipe": {
            "name": "Blueberry Banana Oatmeal"
          }
        },
        {
          "programDate": "2020-01-21",
          "mealTime": "snack",
          "recipe": {
            "name": "Apple With Peanut Butter Dip"
          }
        },
        {
          "programDate": "2020-01-21",
          "mealTime": "lunch",
          "recipe": {
            "name": "Strawberry And Spinach Salad"
          }
        },
        {
          "programDate": "2020-01-21",
          "mealTime": "snack",
          "recipe": {
            "name": "Apple Salad"
          }
        },
        {
          "programDate": "2020-01-21",
          "mealTime": "dinner",
          "recipe": {
            "name": "Turkey Bowl"
          }
        }
      ],
      "day2": [
        {
          "mealTime": "breakfast",
          "recipe": {
            "name": "Mushroom Omelette With Salad"
          }
        },
        {
          "mealTime": "snack",
          "recipe": {
            "name": "Olives With Low-Fat Cheese"
          }
        },
        {
          "mealTime": "lunch",
          "recipe": {
            "name": "Salmon Lettuce Wraps"
          }
        },
        {
          "mealTime": "snack",
          "recipe": {
            "name": "Celery With Almond Butter"
          }
        },
        {
          "mealTime": "dinner",
          "recipe": {
            "name": "Broccoli Salad"
          }
        }
      ],
      "day3": [
        {
          "mealTime": "breakfast",
          "recipe": {
            "name": "Rice Porridge With Strawberries And Macadamia Nuts"
          }
        },
        {
          "mealTime": "snack",
          "recipe": {
            "name": "Celery With Almond Butter"
          }
        },
        {
          "mealTime": "lunch",
          "recipe": {
            "name": "Beef And Zucchini Noodles With Alfredo Sauce"
          }
        },
        {
          "mealTime": "snack",
          "recipe": {
            "name": "Blueberry & Apricot Crisp"
          }
        },
        {
          "mealTime": "dinner",
          "recipe": {
            "name": "Baked Salmon And Asparagus"
          }
        }
      ]
    }
  }
}
```

{% 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/meal-plan/meal-planner.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.
