Custom Meal Plan

Generates a Custom Meal Plan based on a daily caloric goal, macro ratios, and the user's profile.

The customMealPlan query will return a list of days with a number of meals, based on the arguments below. Each meal contains a Recipe with all its expected properties along with the amount of recommended servings.

Arguments

Arguments

Type

Description

calories

Int!

Total Calories per day

carbs

Float!

Percent of Carbs

protein

Float!

Percent of Protein

fat

Float!

Percent of Fat

omega3

Float

Percent of Omega 3. If not included, the planner ignores this constraint.

days

Float

Length of meal plan (in days)

format

MealTimeType

Requested meals per day format, Available options are: BREAKFAST, SNACK, LUNCH, DINNER

error

Float!

Margin of error (as a percentage) for calories and macros. Default: 0.05

breakfastDistribution

Float

Percentage of the daily calories goal that each breakfast covers.

lunchDistribution

Float

Percentage of the daily calories goal that each lunch covers.

dinnerDistribution

Float

Percentage of the daily calories goal that each dinner covers.

snackDistribution

Float

Percentage of the daily calories goal that each snack covers.

maxTimeMinutes

Object that returns the maximum values for each meal. Expressed in minutes.

For example, maximum preparation time for the following meals:

  • breakfast: 15

  • lunch: 30

  • dinner: 40

  • snack: 30

maxIngredientsCount

Object that returns the maximum values for each meal. Expressed in minutes.

For example, maximum ingredient count for the following meals:

  • breakfast: 7

  • lunch: 5

  • dinner: 5

  • snack: 6

Available Fields

The following fields will be displayed in the response:

Field name

Type

Note

day

Int

The number of days in the returned meal plan.

calories

Float

Total calories (in Kcal) for the day.

meals

A Recipe along with the amount of recommended servings.

Example

{
  customMealPlan(
    calories: 1600
    carbs: 0.45
    protein: 0.25
    fat: 0.3
    days: 1
		format: [BREAKFAST, LUNCH, DINNER]
		breakfastDistribution: 0.3
      maxTimeMinutes:{
      breakfast:10,
      dinner:8,
      snack:5,
      lunch:3
    }
  ) {
    day
    calories
    meals {
      id
      meal
      numOfServings
      calories
      recipe {
        id
        databaseId
        name
	numberOfServings
        nutrientsPerServing {
          calories
        }
        
      }
    }
  }

  }
  
  

It may occur that meal plan service times out and generates fewer days than requested, if this happens please review your constraints, as too many restrictions may significantly reduce the universe of suitable recipes.

Considerations

  • A margin of error has been set for the resulting meal plan for both calories and macronutrients.

  • No meal repeats on the same day.

  • This query takes into account the user's program and preferences.

  • This query doesn't take into consideration a user's personal caloric goals. Use Meal Plan for that option.

  • A number of quality-related filters have been set, by default, in order to ensure high-quality meal plans:

    • Excludes recipes for desserts, sauces, dips, bread, cocktails, and similar.

    • Excludes recipes with under 40 calories per serving.

    • Excludes snacks with over 5 ingredients.

    • Excludes recipes with over 15 servings.

    • Excludes recipes with more than 45-minute of cooking and preparation time.

    • Excludes 0 calorie foods.

    • Excludes packaged foods.

Last updated