Remove Meal Plan Recipe
Remove a recipe associated with a meal plan
Use the removeMealPlanRecipe
mutation to remove a recipe that is associated with a meal plan. Remove either current or past recipes of any day. Note that the user does not remove the mealId
; for instance, if the user has a Breakfast meal with an associated recipe, this is removed, and the numOfServings
, calories
, and maxNumOfServings
fields values are 0
; however, Breakfast meal as it is will still be listing.
Required Argument
Argument
Type
Description
mealId
ID!
Unique meal ID of the recipe associated with a meal plan. Use the mealPlan
query to get this Id.
Available Fields
Field name
Type
Description
success
Boolean
True if the meal has been removed. Otherwise, it will display False
message
String
Description of the result
Examples
Remove a recipe by a given mealId
mealId
GraphQL Example
Get the mealId
from the mealPlan
query. From the following results the Breakfast mealId
(WVhbDoxNTAzNDIx
) from day 7 is chosen:
Replace that id
in the mutation argument:
Once the meal is successfully removed, execute the meal plan query once more. The results will show a null value in the recipe. The rest of the field values related to the meal appear as 0
.
cURL Example
Last updated
Was this helpful?