Meal Plan generation

This document will help you diagnose and resolve common issues when generating a meal plan.

To check the meal plan settings, execute the debugMealPlanVariables query.

Issue 1: Couldn't generate a meal plan

This is a very common scenario in which the meal plan couldn't generate. Possible scenarios and solutions are described below:

Cause A: Macro goals are high

Mutation: generateMealPlan

Error message: Couldn't generate a meal plan with the current settings.

You will see the following error:

Solution:

When you define the meal plan settings, the macros need to be set up according to the number of meals you have.

Example:

What happened if you define the following meal plan settings

mutation updateMealPlanSettings {
  updateMealPlanSettings(
    update: {
      calories: 1500
      carbs: 45
      protein: 25
      fat: 30
      omega3: 9
      format: [BREAKFAST, SNACK, LUNCH, SNACK, LUNCH, DINNER, SNACK]
    }
  ) {
    success
    message
  }
}

You are asking for 250 kcal per meal approximately, and you have three snacks and four meals when you have a value of 1500 kcal. If you try to distribute that number of kcal in all the meals, no recipes will be found.

In this case, redistribute your macro values, specifically increase the calories value and decrease the omega3 value as in the example below:

mutation updateMealPlanSettings {
  updateMealPlanSettings(
    update: {
      calories: 2500
      carbs: 45
      protein: 25
      fat: 30
      omega3: 3
      format: [BREAKFAST, SNACK, LUNCH, SNACK, DINNER, SNACK]
    }
  ) {
    success
    message
  }
}

Finally, generate your meal plan again.

Cause B: The meal plan generates just a few days

Mutation: generateMealPlan

Error message: none

You will get a 1-day meal plan generated:

Solution:

When you define the meal plan settings, the macros need to be set up according to the number of meals you have.

Example

When you set up a meal plan, make sure to distribute the calories according to the number of meals defined. In the following example, 4000 kcal is distributed between two meals; therefore, there are not enough recipes to display.

Modify the setting to meet the caloric distribution according to the meals:

mutation updateMealPlanSettings {
  updateMealPlanSettings(
    overwrite: {
      calories: 2000
      format: [BREAKFAST, LUNCH]
      
    }
  ) {
    success
    message
  }
}

Generate a meal plan, and see that now it generated a 7-day meal plan:

{
  "data": {
    "mealPlan": [
      {
        "day": 7,
        "date": "2022-06-05",
        "calories": 1972.42838098616,
        "meals": [
          {
            "id": "TWVhbDo4MTc1NzM1",
            "calories": 552.008164750333,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Brunch Frittata",
              "numberOfServings": 3,
              "nutrientsPerServing": {
                "calories": 552.01
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzM2",
            "calories": 546.169072447844,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Keto Broccoli Cheddar Soup",
              "numberOfServings": 4,
              "nutrientsPerServing": {
                "calories": 546.17
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzM3",
            "calories": 874.251143787988,
            "meal": "dinner",
            "numOfServings": 4,
            "recipe": {
              "name": "Veggie Noodles And Chicken",
              "numberOfServings": 4,
              "nutrientsPerServing": {
                "calories": 218.56
              }
            }
          }
        ]
      },
      {
        "day": 6,
        "date": "2022-06-04",
        "calories": 1918.33252123767,
        "meals": [
          {
            "id": "TWVhbDo4MTc1NzMy",
            "calories": 642,
            "meal": "breakfast",
            "numOfServings": 3,
            "recipe": {
              "name": "Greek Frittata",
              "numberOfServings": 6,
              "nutrientsPerServing": {
                "calories": 214
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzMz",
            "calories": 547.788508237667,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Greek Salad With Grilled Salmon",
              "numberOfServings": 3,
              "nutrientsPerServing": {
                "calories": 547.79
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzM0",
            "calories": 728.544013,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Apple-And-Cheddar Frittata Recipes",
              "numberOfServings": 4,
              "nutrientsPerServing": {
                "calories": 364.27
              }
            }
          }
        ]
      },
      {
        "day": 5,
        "date": "2022-06-03",
        "calories": 2001.29971515398,
        "meals": [
          {
            "id": "TWVhbDo4MTc1NzI5",
            "calories": 698.7573,
            "meal": "breakfast",
            "numOfServings": 3,
            "recipe": {
              "name": "Supercharged Spinach Pancakes",
              "numberOfServings": 3,
              "nutrientsPerServing": {
                "calories": 232.92
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzMw",
            "calories": 579.788678818819,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Mexican-Style Stuffed Zucchini",
              "numberOfServings": 3,
              "nutrientsPerServing": {
                "calories": 579.79
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzMx",
            "calories": 722.753736335157,
            "meal": "dinner",
            "numOfServings": 1,
            "recipe": {
              "name": "Bbq Chicken With Sweet Chili–Peach Glaze",
              "numberOfServings": 4,
              "nutrientsPerServing": {
                "calories": 722.75
              }
            }
          }
        ]
      },
      {
        "day": 4,
        "date": "2022-06-02",
        "calories": 1910.97340571106,
        "meals": [
          {
            "id": "TWVhbDo4MTc1NzI2",
            "calories": 570.058513333333,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Tumeric Omelette",
              "numberOfServings": 1,
              "nutrientsPerServing": {
                "calories": 570.06
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzI3",
            "calories": 599.706925827729,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Easy Keto Alfredo",
              "numberOfServings": 4,
              "nutrientsPerServing": {
                "calories": 599.71
              }
            }
          },
          {
            "id": "TWVhbDo4MTc1NzI4",
            "calories": 741.20796655,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Enchilada Chicken Recipes",
              "numberOfServings": 4,
              "nutrientsPerServing": {
                "calories": 370.6
              }
            }
          }
        ]
      },
      {
        "day": 3,
        "date": "2022-06-01",
        "calories": 1961.44286145526,
        "meals": [
.......

Cause C: Macros don't match with the current program

Mutation: generateMealPlan

Error message: Couldn't generate a meal plan with the current settings.

One of the most challenging aspects of doing a vegan or keto diet is defining the recommended macros accordingly.

Solution:

When you define the meal plan settings, macros or restrictions must be defined according to the program assigned.

Example

In the example below, the following information is setup:

Program: Keto

Macro Goals:

  • Calories: 3000

  • Fat: 20

  • Carbs:15

  • Protein: 65

Meal Plan format: [BREAKFAST, LUNCH, DINNER]

When trying to generate a meal plan, the following message is displayed:

This error appears because of the macros and restrictions defined in the keto program.

Meal Plan settings must be modified according to the Keto Diet which includes the following recommendations:

  • Calories: 900 kcal per day

  • Fat: 70%

  • Carbs: 5%

  • Protein: 25%

After modifying the meal plan settings, generate it again.

Last updated