Update Meal Plan Settings
Last updated
Last updated
Use the updateMealPlanSettings
mutation to update or overwrite the user's meal plan settings. All the arguments to be sent are optional; however, it will update only the arguments sent in the mutation. The information is saved and it can be later requested by executing the mealPlan query.
If the update
and overwrite
arguments are defined at the same time, the overwrite
argument will be the one applied.
Use the following arguments within the update and overwrite objects:
The following example updates the protein and calories values:
The following example updates the meal format and sets automatically the rest of arguments not send as null:
The following example uses query variables and updates the calories and proteins values:
Name
Type
Description
update
Object
Update the values added to it. For example, update: { calories: 1600, protein: 20 }
ovewrite
Object
Overwrite only the values added to it. The ones that were not added will be set as null
. For example: overwrite: { format: [BREAKFAST, LUNCH, DINNER] }
Arguments
Type
Description
calories
Int
Total Calories per day. If using the overwrite and no calories value is defined, the default value is set to 1400.
carbs
Int
Percent of Carbs
fat
Int
Percent of Fat
format
MealTime!
Requested meals per day format. Available options: BREAKFAST, SNACK, LUNCH, DINNER
.
The list cannot have a null value, i.e, [BREAKFAST, null]
. However, it is possible to send the list in the following formats:
format: null
format: []
Not send a format
If not format is sent, the following format is set as default: [BREAKFAST, SNACK, LUNCH, DINNER]
omega3
Float
Percent of Omega 3.
protein
Int
Percent of Protein