Generate Simple Meal Plan
Generate a simple meal
Last updated
Was this helpful?
Generate a simple meal
Last updated
Was this helpful?
The generateSimpleMealPlan
mutation generates a 7-days meal plan that complies with the user's program and preferences.
The generateSimpleMealPlan
includes default values, for example, each day has breakfast, lunch, dinner, and a single snack, with a daily caloric goal of 2000 kcal.
Use if what you need is to generate a meal plan with recipes that contain a specific caloric range or tags per mealtime.
By default, generateSimpleMealPlan
locks the meal plan to stop the user from generating a new meal plan if one is in progress. In other words, a user can't generate a new meal plan if the current one still has dates in the future.
If you need more control over these settings, please review the mutation.
The generateSimpleMealPlan
inlcudes an option to increase or decrease rules depending on the rules defined in a .
Generate a meal plan more consistently to simplify shopping by defining the variety
argument to specify the number of repetitions per meal.
There are 3 levels of variety:
LOW:
Generate three different meals in the week. For example, the meal plan generates three breakfasts, three lunches, three dinners, and three snacks distributed across the week.
MEDIUM:
Generate 5 different meals in the week.
HIGH:
All generated meals are different. This is the current behavior of the meal plan.
This is not a required argument, so if it is not defined, the high
variety is set as default.
Argument Name
Type
Description
addDays
Boolean
True to allow generating a new meal plan if a user is on her last meal plan day. This field is ignored if ignoreLock
is true. Default is false.
isAppend
Boolean
True to add an additional week worth of meal plan (7 days) to the end of the current meal plan each time is executed. (Default is false.)
appendDays
Int
After setting isAppend
to True use appendDays
to define the amount of days to append. (max 7)
ignoreLock
Boolean
True to allow generating a new meal plan any time, overwriting any pending days in the current plan. Default is false.
repeat
Datetime
Create a new meal plan repeating the 7 dates after repeat in user's history. Default to null
boostAdherence
Boolean
True to consider increase and decrease rules in simpleMealPlan. All the recipes included will have a higher score. Otherwise is False. By default, this value is set to false
filters
variety
MPVariety
Define the variety of the recipes generated in the meal plan. Possible Values: LOW
, MEDIUM
, or HIGH
The following fields will be displayed in the response:
Field
Type
Description
success
Boolean
True if a meal entry has been created. Otherwise, it displays False
message
String
Description of the result
If the user doesn't have enough history days, the following message is displayed:
If you try using generateSimpleMealPlan
, while a meal plan is in progress, you'll get the following response:
To bypass the lock, send the argument ignoreLock: true
.
If it is required to set the with a custom format such as [BREAKFAST, SNACK, LUNCH, SNACK, DINNER, SNACK],
use the or the .
The generateSimpleMealPlan
does not consider the user's macro goals. Instead, you can use the mutation.
Don't forget to execute the query to verify that your meal plan has been created successfully.
To understand how a meal plan works refer to .
Object that generate a simple meal plan by using specific information such as [
]
caloric range
tags
and maxTimeMinutes