Technical Docs
  • Introduction
  • Guides
    • Getting Started
    • Attribution Guidelines
    • Core Concepts
      • Adherence Score
      • Programs, Diets, and Rulesets
      • User Profile
      • Datasets
    • Tutorials and Walkthroughs
      • Creating a Meal Plan
      • Food Log Guide
      • Pagination
      • Executing Multiple Mutations
  • Knowledge Base
    • How-to guides
      • How to add desserts to your meal plan
      • How to log your custom recipe
      • How to generate a Meal Plan based on a template
    • Common errors
      • Meal Plan generation
    • FAQs
      • Getting Started on Suggestic
      • API and Authentication
      • Device Compatibility
      • Meal Plan
      • Nutrition
      • Programs
      • Recipes
  • HELPFUL RESOURCES
    • Deprecated Features
    • Glossary
    • Integrations
      • Building a No-code Meal Planning Application
        • Step 1: Creating the Integromat Scenario and Google Forms Connection
        • Step 2: Creating a User, Generating a Meal Plan, and Retrieving It
        • Step 3: Crafting Our PDF and Connecting PDFMonkey
        • Step 4: Sending The Document to Our User
  • Packages and SDKs
    • Node Package (NPM)
  • GraphQL
    • GraphQL Overview
    • Authentication
    • Calling GraphQL
    • GraphQL Playground
  • Changelog
    • 2025
      • March
  • Suggestic API Reference
    • Search
      • Food Log
        • Branded Foods Search
        • Common Foods Search
        • My Branded Food Search
        • My Common Foods Search
        • Food Search
        • Legacy
          • Autocomplete
          • Barcode Search
      • Recipe Search
        • Recipe Search
        • Recipe Search by Name or Ingredients
        • Recipe Search by Ingredients
      • Meal Plan Template Search
      • Profile Search
      • Restaurant Search
        • Restaurant Search by Location
        • Restaurant Search
    • Queries
      • Appointments
        • Upcoming Appointments
        • Past Appointments
        • Appointments Types
      • Assessments
        • Assessment Answers
        • Display Assessments
        • Supplement Recommendations
        • User Assessments
      • Content
        • Content Library
        • Content Categories
        • Content Tags
        • Journey
      • Food Log
        • Frequently Logged
        • Food Log Entries
        • Macros Aggregation
        • Micronutrients Aggregation
        • Macro Goals
        • Recently Logged
        • User's Foods and Recipes
          • User's Recipes
        • Legacy
          • Food Log Entries (Legacy)
          • Own Food Items
          • Own Food Item
          • Own Food Item by Id
          • Own Items
          • Own Recipe
          • Own Recipes
      • Lab Tests
        • Biomarker Categories
        • Biomarker Units
        • Biomarker Catalog
        • Biomarkers
        • Biomarker Results
        • Historical Biomarker Results
        • Historical Results by Biomarker
        • Lab Test Reports
        • Recommended Supplements
        • Recommended Articles
      • Meal Plan
        • Meal Plan
        • Custom Meal Plan
        • Simplified Meal Tracking
          • Meal Tracker
        • Meal Plan Config
        • Meal Planner (deprecated)
      • Program
        • All Programs
        • Program Details
      • Recipes
        • Equivalent Recipes (Macros)
        • Equivalent Recipes (Calories)
        • Recipe by Id
        • Recipes By MealTime
        • Recipes By Tag
        • Recipe Swap Options
        • Popular Recipes
        • Favorite Recipes
        • Premium Program Recipes
      • Restaurants
        • Restaurant By Id
        • Menu Items
        • Menu Item By Id
        • Menu Item by Program
        • Recommend Menu Items
      • Restrictions
        • Restrictions
        • Restriction by ID
      • Shopping List
        • Shopping List by Aisle
        • Shopping List by Recipes
      • Subscriptions
        • Subscription List
      • Supplement Plans
        • Supplement plan list
        • Supplement list
      • Tracking
        • Activity and Exercise
        • Checklists
          • Intake Checklist
        • Daily Recap
          • Get Daily Recap
          • Get Daily Recaps
          • Get Daily Recap Questions
          • Get Daily Mood Summary
        • Inisghts
        • Wellness Score
        • Sleep
          • Sleep Time
          • Sleep Quality Score
        • Steps
        • Water and Hydration
        • Heart Rate
        • HRV
        • Weight Tracker
      • USDA Food
      • Users
        • Users
        • User Profile
      • WGPT
        • Assistants
        • Journey
        • Guardrails
    • Mutations
      • Appointments
        • Update Appointment Credits
      • Assessments
        • New User Assessments
        • Set User Answers
      • Content
        • Mark Content as Read
      • Feedback
      • Food Log
        • Log Entries
          • Food Log
            • Add a Food Log Entry
            • Delete a Food Log Entry
          • Meal Log (Legacy)
            • Create Log Entry
            • Update Log Entry
            • Remove Log Entry
        • User's Foods and Recipes
          • Create a User Recipe
          • Create my Branded Food
          • Create my Common Foods
          • Update a User Recipe
          • Delete a User Recipe
          • Legacy: "Own" Recipe
            • Create "Own" Recipe
            • Update "Own" Recipe
            • Remove "Own" Recipe
        • AI Food Log
          • Process Ai Food
        • Legacy (ownFoods and ownRecipes)
          • Create "own" Food Item
          • Update "own Food"
          • Remove "own" Food Item
      • Journey Status
        • Start Journeys
        • Journey Status
        • Toggle Task Completed
      • Lab Tests
        • Add Biomarker
        • Update Biomarker
        • Add Biomarker Result
        • Add Biomarker Category
        • Update Biomarker Category
        • Remove Biomarker Category
        • Add Lab Test Report
        • Delete Lab Test Report
        • Update Lab Test Report
        • Create Recommended Supplement
        • Update Recommended Supplement
        • Remove Recommended Supplement
        • Create Recommended Article
        • Update Recommended Article
        • Remove Recommended Supplement
      • Meal Plan
        • Create Meal Plan Template
          • Custom Options
          • From Days
          • From Scratch
        • Assign a Meal Plan Template to a User
        • Generate Simple Meal Plan
        • Generate Meal Plan
        • Start Over Meal Plan
        • Swap Meals
        • Simplified Meal Tracking
          • Create a Meal Tracker Entry
        • Remove Meal Plan
        • Remove Meal Plan Recipe
      • Recipes
        • Add new recipe
        • Add Favorite Recipe
      • Shopping List
        • Add Multiple Recipes to the Shopping List
        • Add a Recipe to the Shopping List
        • Bulk Check/Uncheck Items
        • Check/Uncheck an Item
        • Clear Checked Items
        • Clear Shopping List
        • Remove Recipe
        • Update Serving Number
      • Subscriptions
        • Update Subscription
      • Supplement Plans
        • Create supplement plan for user
        • Update user supplement plan
        • Add Supplement
        • Update Supplement
      • Tracking
        • Activity and Exercise
          • Add Exercise Entry
          • Delete Exercise Entry
        • Checklists
          • Create my Checklist Item
          • Delete my Checklist Item
        • Daily Recap
          • Create a daily recap question
          • Select Daily Recap Questions
          • Delete a Daily Recap Question
        • Sleep
          • Add Sleep Time
          • Add Sleep Quality Score
        • Steps
          • Add Steps Count
          • Delete Steps Count
        • Heart Rate
          • Add Heart Rate
          • Delete Heart Rate
        • HRV
          • Add HRV
          • Delete HRV
        • Water and Hydration
        • Weight
          • Add Weight Entry
          • Remove Weight Entry
        • User Tracker Goals
          • Create User Goal
          • Update User Goal
          • Remove User Goal
      • Users
        • Authenticate using a Magic Link
        • Create User
        • Custom Attributes
        • Delete a User Account
        • Login User
        • Merge User Accounts
        • Request Reset Password
        • Reset Password
        • Request Password Reset email
        • Sensitive Profile Attributes
        • Update Profile
        • Update User's Program
        • User's Restrictions
        • Update Meal Plan Settings
        • User's Goals
        • Legacy User Mutations
          • Legacy | User's Biomarkers
          • User's Meal Plan Settings (deprecated)
      • WGPT
        • Add user to journey
  • Objects
    • Appointments
      • Appointment
      • Appointment Type
      • Appointment Credit
      • Attendee
      • Coach
    • Common
      • User
      • Adherence
      • Aisle Name
      • CPC
      • CPCIngredientGroup
      • Meal Times
      • Menu Item
      • Own Serving
      • Own Nutrients
      • MacroNutrientsRangeInput
      • Range
      • Tracker
      • Restaurant
    • Food Logs
      • Food Filter
      • Ingredient Amount
      • Ingredients
      • Own Recipe Ingredient
      • Meal Type
      • Nutrients
        • Nutrient Enum
      • Portions
      • Servings
      • AI Food Log
        • Food Analysis
    • Meal Plan
      • Debug Meal Plan Conditions
      • Meal
      • Meal Plan Day
      • Maximum Time per Meal
      • Maximum Ingredient Count
      • Meal Plan Template
      • Simple Meal Plan Filters
    • Recipe
      • Recipe
        • Tags
        • Cuisines
      • Recipe Swap Options
      • Parsed Ingredient Lines
      • Nutritional Info
      • Nutrients Per Serving
      • Calories Per Serving
      • Relative Calories
      • Source
      • Ingredients
      • Units of Measurement
    • Lab Tests
      • Article
      • Biomarker
    • Supplement
    • Assessments
      • Question
      • Answer
    • Content
      • Content Library
      • Content Categories
      • Content Tag
    • WGPT
      • Journey
      • dayJourney
      • Interaction
  • Case Studies
    • Reverse Health Case Study
Powered by GitBook
On this page
  • Overview
  • Requirements
  • Considerations
  • API Endpoints to use
  • Examples
  • Code Example
  • Step by Step Example

Was this helpful?

  1. Knowledge Base
  2. How-to guides

How to generate a Meal Plan based on a template

The document will guide you through the steps to generate a meal plan based on a meal plan template

PreviousHow to log your custom recipeNextCommon errors

Last updated 2 years ago

Was this helpful?

Overview

Different dietary plans do not require following a 7-day meal plan or having a fixed list of recipes generated randomly based on some parameters. Instead, people, including coaches, want to get more control over what they choose in a dietary plan.

Managing meal plan templates gives people the freedom to control what to choose to generate a meal plan, from the number of days to the recipes according to a user's needs.

Requirements

  • None

Considerations

  • Meal Plan Template endpoints only require sending the token within the header.

API Endpoints to use

Through the example, use the following endpoints in the same order as they are listed below:

  • Use any of the search queries to find the recipes that best suit your dietary requirements

  • The to create a meal plan template according to your requirements.

  • The to list the recent meal plan template created.

  • The to generate the meal plan including the meal plan template ID.

  • The to verify that the meal plan was generated based on the meal plan template.

Examples

The following example describes how to create a 3-day vegan meal plan based on the information added in a meal plan template. Find the characteristics of the meal plan to create as follows:

  • Number of days: 3

  • Meal Plan Template type: From Scratch

  • Meal Type: BREAKFAST, LUNCH, DINNER

  • Number of Servings: 2, 3, 2 respectively

Code Example

Step by Step Example

Follow the 5 steps below to generate a meal plan based on a meal plan template.

STEP 1: Get the List of recipes

Request:

{
  recipeSearch(
    query: "bagels"
    dietaryTag: VEGAN
    first: 2
) {
    edges {
      node {
        name 
        id
        author
        tags
      }
    }
  }
}

Response:

{
  "data": {
    "recipeSearch": {
      "edges": [
        {
          "node": {
            "name": "Bagels",
            "id": "UmVjaXBlOmZjZDA0YTdmLWZjMTktNDljYi1iZDhjLTliNTFlM2ZmMDBjZA==",
            "author": "Brown Eyed Baker",
            "tags": [
              "VEGETARIAN",
              "PLANT_BASED",
              "DAIRY_FREE",
              "VEGAN",
              "Breakfast"
            ]
          }
        },
        {
          "node": {
            "name": "Bagels",
            "id": "UmVjaXBlOjMxYTVjZjk5LTE4NjctNDRiZS1iMmFmLWNkODIwMzg0YTI3OA==",
            "author": "Food.com",
            "tags": [
              "VEGETARIAN",
              "PLANT_BASED",
              "DAIRY_FREE",
              "VEGAN",
              "Breakfast"
            ]
          }
        }
      ]
    }
  }
}

From the response, copy the recipe id-> UmVjaXBlOmZjZDA0YTdmLWZjMTktNDljYi1iZDhjLTliNTFlM2ZmMDBjZA==. This will be later replace in the meal plan template creation.

Repeat the same action until you get all the recipes for the three days.

STEP 2: Create a meal plan template

The following example creates a 3-day meal plan. Copy and replace the IDs you got form the recipeSearch query into each one of the recipeId fields

mutation {
  createMealPlanTemplate(
    name: "Vegan Meal Plan"
    description: "A 3-day vegan meal plan"
    fromScratch: {
      days: [
        {
          meals: [
            {
              recipeId: "UmVjaXBlOmZjZDA0YTdmLWZjMTktNDljYi1iZDhjLTliNTFlM2ZmMDBjZA=="
              mealType: BREAKFAST
              servings: 2
            }
            {
              recipeId: "UmVjaXBlOjE1MDk0MDQxLTYyMWItNGM0Ni04OGViLTUzM2FlNmRlMTI4Zg=="
              mealType: LUNCH
              servings: 3
            }
            {
              recipeId: "UmVjaXBlOjE1MDk0MDQxLTYyMWItNGM0Ni04OGViLTUzM2FlNmRlMTI4Zg=="
              mealType: DINNER
              servings: 2
            }
          ]
        }
        {
          meals: [
            {
              recipeId: "UmVjaXBlOjE2OTBlMjU1LWFhZGUtNDA2Yy05MTJiLWZhYTI0MDVmYTk2Zg=="
              mealType: BREAKFAST
              servings: 2
            }
            {
              recipeId: "UmVjaXBlOjE1MDk0MDQxLTYyMWItNGM0Ni04OGViLTUzM2FlNmRlMTI4Zg=="
              mealType: LUNCH
              servings: 3
            }
            {
              recipeId: "UmVjaXBlOjE1MDk0MDQxLTYyMWItNGM0Ni04OGViLTUzM2FlNmRlMTI4Zg=="
              mealType: DINNER
              servings: 2
            }
          ]
        }
        {
          meals: [
            {
              recipeId: "UmVjaXBlOjMxYTVjZjk5LTE4NjctNDRiZS1iMmFmLWNkODIwMzg0YTI3OA=="
              mealType: BREAKFAST
              servings: 2
            }
            {
              recipeId: "UmVjaXBlOjE1MDk0MDQxLTYyMWItNGM0Ni04OGViLTUzM2FlNmRlMTI4Zg=="
              mealType: LUNCH
              servings: 3
            }
            {
              recipeId: "UmVjaXBlOjE1MDk0MDQxLTYyMWItNGM0Ni04OGViLTUzM2FlNmRlMTI4Zg=="
              mealType: DINNER
              servings: 2
            }
          ]
        }
      ]
    }
  ) {
    message
    success
  }
}
STEP 3: Get the ID of the recently created meal plan template

Use the mealPlanTemplates to find the created meal plan template.

Request:

query {
  mealPlanTemplates {
    edges {
      node {
        id
        description
        createdAt
        coachId
        isPublic
        days {
          day
          meals {
            recipe {
              name
            }
            calories
            numOfServings
          }
        }
      }
    }
  }
}

Response:

{
  "data": {
    "mealPlanTemplates": {
      "edges": [
        {
          "node": {
            "id": "TWVhbFBsYW5UZW1wbGF0ZTo3ODQyMDdkOC1lZjZmLTRlYmYtYTlmNC04YWVjNjQ3NjQ3MTA=",
            "description": "A 3-day vegan meal plan",
            "createdAt": "2022-05-16T20:46:11.146068+00:00",
            "coachId": null,
            "isPublic": false,
            "days": [
              {
                "day": 1,
                "meals": [
                  {
                    "recipe": {
                      "name": "Bagels"
                    },
                    "calories": 293.693491666667,
                    "numOfServings": 2
                  },
                  {
                    "recipe": {
                      "name": "Apple-Orange Smoothie With Yogurt"
                    },
                    "calories": 514.1761,
                    "numOfServings": 3
                  },
                  {
                    "recipe": {
                      "name": "Apple-Orange Smoothie With Yogurt"
                    },
                    "calories": 514.1761,
                    "numOfServings": 2
                  }
                ]
              }
            ]
        }
     }
}

From the response, copy the recipe id-> TWVhbFBsYW5UZW1wbGF0ZTo3ODQyMDdkOC1lZjZmLTRlYmYtYTlmNC04YWVjNjQ3NjQ3MTA=. This will be later replace in the meal plan creation .

STEP 4: Generate the meal plan

Use the GenerateMealPlan to create the meal plan based on the template created before. In the request, use the fromTemplate argument to include the meal templated ID:

Note: You can include either the mealPlan object within the generateMealPlan mutation to retrieve the information of the meal plan created or use the mealPlan query separately to get this information.

Request:

mutation {
  generateMealPlan(
    fromTemplate: "TWVhbFBsYW5UZW1wbGF0ZTo3ODQyMDdkOC1lZjZmLTRlYmYtYTlmNC04YWVjNjQ3NjQ3MTA="
  ) {
    success
    message
    mealPlan {
      day
      date
      meals {
        id
        meal
      }
    }
  }
}

Response:

{
  "data": {
    "generateMealPlan": {
      "success": true,
      "message": "Meal plan generated.",
      "mealPlan": [
        {
          "day": 3,
          "date": "2022-05-20 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDo3MjM5MTc2",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDo3MjM5MTc3",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDo3MjM5MTc4",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 2,
          "date": "2022-05-19 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDo3MjM5MTcz",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDo3MjM5MTc0",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDo3MjM5MTc1",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 1,
          "date": "2022-05-18 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDo3MjM5MTcw",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDo3MjM5MTcx",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDo3MjM5MTcy",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 7,
          "date": "2022-02-08 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDoyNjAyNjg2",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDoyNjAyNjg3",
              "meal": "snack"
            },
            {
              "id": "TWVhbDoyNjAyNjg4",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDoyNjAyNjg5",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 6,
          "date": "2022-02-07 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDoyNjAyNjgy",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDoyNjAyNjgz",
              "meal": "snack"
            },
            {
              "id": "TWVhbDoyNjAyNjg0",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDoyNjAyNjg1",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 5,
          "date": "2022-02-06 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDoyNjAyNjc4",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDoyNjAyNjc5",
              "meal": "snack"
            },
            {
              "id": "TWVhbDoyNjAyNjgw",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDoyNjAyNjgx",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 4,
          "date": "2022-02-05 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDoyNjAyNjc0",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDoyNjAyNjc1",
              "meal": "snack"
            },
            {
              "id": "TWVhbDoyNjAyNjc2",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDoyNjAyNjc3",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 3,
          "date": "2022-02-04 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDoyNjAyNjcw",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDoyNjAyNjcx",
              "meal": "snack"
            },
            {
              "id": "TWVhbDoyNjAyNjcy",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDoyNjAyNjcz",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 2,
          "date": "2022-02-03 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDoyNjAyNjY2",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDoyNjAyNjY3",
              "meal": "snack"
            },
            {
              "id": "TWVhbDoyNjAyNjY4",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDoyNjAyNjY5",
              "meal": "dinner"
            }
          ]
        },
        {
          "day": 1,
          "date": "2022-02-02 02:00:00+00:00",
          "meals": [
            {
              "id": "TWVhbDoyNjAyNjYy",
              "meal": "breakfast"
            },
            {
              "id": "TWVhbDoyNjAyNjYz",
              "meal": "snack"
            },
            {
              "id": "TWVhbDoyNjAyNjY0",
              "meal": "lunch"
            },
            {
              "id": "TWVhbDoyNjAyNjY1",
              "meal": "dinner"
            }
          ]
        }
      ]
    }
  }
}
STEP 5: Get the information of the meal plan

Execute the mealPlan query to retrieve the information of the recent meal plan created. Check that the 3 days have been created along with the information sent in the meal plan template.

Note that calories, the number of servings, calories per serving, and other nutritional information, are calculated automatically based on the recipe information.

Request:

{
  mealPlan {
    day
    date(useDatetime: false)
    calories
    meals {
      id
      calories
      meal
      numOfServings
      recipe {
        name
        numberOfServings
        caloriesPerServing {
          carbs
          saturatedFat
        }
        nutrientsPerServing {
          calories
          carbs
        }
      }
    }
  }
}

Response:

{
  "darapta": {
    "mealPlan": [
      {
        "day": 3,
        "date": "2022-05-20",
        "calories": 1140.3418,
        "meals": [
          {
            "id": "TWVhbDo3MjM5MTc2",
            "calories": 111.9896,
            "meal": "breakfast",
            "numOfServings": 2,
            "recipe": {
              "name": "Bagels",
              "numberOfServings": 12,
              "caloriesPerServing": {
                "carbs": 75.73,
                "saturatedFat": 1.95
              },
              "nutrientsPerServing": {
                "calories": 111.99,
                "carbs": 18.93
              }
            }
          },
          {
            "id": "TWVhbDo3MjM5MTc3",
            "calories": 514.1761,
            "meal": "lunch",
            "numOfServings": 3,
            "recipe": {
              "name": "Apple-Orange Smoothie With Yogurt",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 292.81,
                "saturatedFat": 93.42
              },
              "nutrientsPerServing": {
                "calories": 514.18,
                "carbs": 73.2
              }
            }
          },
          {
            "id": "TWVhbDo3MjM5MTc4",
            "calories": 514.1761,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Apple-Orange Smoothie With Yogurt",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 292.81,
                "saturatedFat": 93.42
              },
              "nutrientsPerServing": {
                "calories": 514.18,
                "carbs": 73.2
              }
            }
          }
        ]
      },
      {
        "day": 2,
        "date": "2022-05-19",
        "calories": 2289.989575,
        "meals": [
          {
            "id": "TWVhbDo3MjM5MTcz",
            "calories": 1261.637375,
            "meal": "breakfast",
            "numOfServings": 2,
            "recipe": {
              "name": "Coconut Milk Yogurt With Fruit And Nuts",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 299.11,
                "saturatedFat": 410.32
              },
              "nutrientsPerServing": {
                "calories": 1261.64,
                "carbs": 74.78
              }
            }
          },
          {
            "id": "TWVhbDo3MjM5MTc0",
            "calories": 514.1761,
            "meal": "lunch",
            "numOfServings": 3,
            "recipe": {
              "name": "Apple-Orange Smoothie With Yogurt",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 292.81,
                "saturatedFat": 93.42
              },
              "nutrientsPerServing": {
                "calories": 514.18,
                "carbs": 73.2
              }
            }
          },
          {
            "id": "TWVhbDo3MjM5MTc1",
            "calories": 514.1761,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Apple-Orange Smoothie With Yogurt",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 292.81,
                "saturatedFat": 93.42
              },
              "nutrientsPerServing": {
                "calories": 514.18,
                "carbs": 73.2
              }
            }
          }
        ]
      },
      {
        "day": 1,
        "date": "2022-05-18",
        "calories": 1322.04569166667,
        "meals": [
          {
            "id": "TWVhbDo3MjM5MTcw",
            "calories": 293.693491666667,
            "meal": "breakfast",
            "numOfServings": 2,
            "recipe": {
              "name": "Bagels",
              "numberOfServings": 12,
              "caloriesPerServing": {
                "carbs": 170.57,
                "saturatedFat": 33.97
              },
              "nutrientsPerServing": {
                "calories": 293.69,
                "carbs": 42.64
              }
            }
          },
          {
            "id": "TWVhbDo3MjM5MTcx",
            "calories": 514.1761,
            "meal": "lunch",
            "numOfServings": 3,
            "recipe": {
              "name": "Apple-Orange Smoothie With Yogurt",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 292.81,
                "saturatedFat": 93.42
              },
              "nutrientsPerServing": {
                "calories": 514.18,
                "carbs": 73.2
              }
            }
          },
          {
            "id": "TWVhbDo3MjM5MTcy",
            "calories": 514.1761,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Apple-Orange Smoothie With Yogurt",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 292.81,
                "saturatedFat": 93.42
              },
              "nutrientsPerServing": {
                "calories": 514.18,
                "carbs": 73.2
              }
            }
          }
        ]
      },
      {
        "day": 7,
        "date": "2022-02-08",
        "calories": 1611.83026353901,
        "meals": [
          {
            "id": "TWVhbDoyNjAyNjg2",
            "calories": 201.260440660979,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Chicken-Berry Salad",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 48.16,
                "saturatedFat": 31.05
              },
              "nutrientsPerServing": {
                "calories": 201.26,
                "carbs": 12.04
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjg3",
            "calories": 202.468522486167,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Garlic Soybean Sprouts",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 57.85,
                "saturatedFat": 11.05
              },
              "nutrientsPerServing": {
                "calories": 202.47,
                "carbs": 14.46
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjg4",
            "calories": 442.45946009413,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Cajun Chickpea & Carrot Salad",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 294.05,
                "saturatedFat": 6.07
              },
              "nutrientsPerServing": {
                "calories": 442.46,
                "carbs": 73.51
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjg5",
            "calories": 270.767687772459,
            "meal": "dinner",
            "numOfServings": 1,
            "recipe": {
              "name": "Crockpot Italian Chicken And Peppers Recipes",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 87.01,
                "saturatedFat": 23.66
              },
              "nutrientsPerServing": {
                "calories": 270.77,
                "carbs": 21.75
              }
            }
          }
        ]
      },
      {
        "day": 6,
        "date": "2022-02-07",
        "calories": 1555.30797310539,
        "meals": [
          {
            "id": "TWVhbDoyNjAyNjgy",
            "calories": 563.737203099,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Apple Coconut Parfait",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 139.6,
                "saturatedFat": 177.87
              },
              "nutrientsPerServing": {
                "calories": 563.74,
                "carbs": 34.9
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjgz",
            "calories": 122.1237,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Plum Pomegranate Smoothie",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 102.76,
                "saturatedFat": 1.09
              },
              "nutrientsPerServing": {
                "calories": 122.12,
                "carbs": 25.69
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjg0",
            "calories": 484.969860139719,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Air Fryer Beef Taco Bowls",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 198.36,
                "saturatedFat": 68
              },
              "nutrientsPerServing": {
                "calories": 487.03,
                "carbs": 49.59
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjg1",
            "calories": 384.477209866667,
            "meal": "dinner",
            "numOfServings": 1,
            "recipe": {
              "name": "8-Minute Beet Juice Poached Salmon Recipes",
              "numberOfServings": 3,
              "caloriesPerServing": {
                "carbs": 65.89,
                "saturatedFat": 42.48
              },
              "nutrientsPerServing": {
                "calories": 384.48,
                "carbs": 16.47
              }
            }
          }
        ]
      },
      {
        "day": 5,
        "date": "2022-02-06",
        "calories": 1558.13911903352,
        "meals": [
          {
            "id": "TWVhbDoyNjAyNjc4",
            "calories": 669.1739475,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Diy Muesli",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 272.08,
                "saturatedFat": 37.12
              },
              "nutrientsPerServing": {
                "calories": 669.17,
                "carbs": 68.02
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjc5",
            "calories": 223.376733333333,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Refreshing Red Berry Smoothie",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 208.28,
                "saturatedFat": 0.82
              },
              "nutrientsPerServing": {
                "calories": 223.38,
                "carbs": 52.07
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjgw",
            "calories": 423.635938200183,
            "meal": "lunch",
            "numOfServings": 2,
            "recipe": {
              "name": "Thai Chicken In Cabbage Leaves Recipes",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 15.6,
                "saturatedFat": 27.37
              },
              "nutrientsPerServing": {
                "calories": 211.82,
                "carbs": 3.9
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjgx",
            "calories": 241.9525,
            "meal": "dinner",
            "numOfServings": 1,
            "recipe": {
              "name": "Fruit Filled Green Salad With Citrus Dressing Recipes",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 128.5,
                "saturatedFat": 13.39
              },
              "nutrientsPerServing": {
                "calories": 241.95,
                "carbs": 32.12
              }
            }
          }
        ]
      },
      {
        "day": 4,
        "date": "2022-02-05",
        "calories": 1581.05301117559,
        "meals": [
          {
            "id": "TWVhbDoyNjAyNjc0",
            "calories": 429.55,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Overnight Tropical Chia Mousse",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 120,
                "saturatedFat": 205.65
              },
              "nutrientsPerServing": {
                "calories": 429.55,
                "carbs": 30
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjc1",
            "calories": 151.644242008333,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Tomato And Watermelon Smoothie",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 268.23,
                "saturatedFat": 2.58
              },
              "nutrientsPerServing": {
                "calories": 386.86,
                "carbs": 67.06
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjc2",
            "calories": 598.9559775,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Quinoa And Lentil Salad With Parsley",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 254.1,
                "saturatedFat": 3.51
              },
              "nutrientsPerServing": {
                "calories": 369.02,
                "carbs": 63.53
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjc3",
            "calories": 400.902791667259,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Egg-Free, Gluten-Free Salmon Patties - Rev",
              "numberOfServings": 6,
              "caloriesPerServing": {
                "carbs": 29.69,
                "saturatedFat": 21.25
              },
              "nutrientsPerServing": {
                "calories": 200.45,
                "carbs": 7.42
              }
            }
          }
        ]
      },
      {
        "day": 3,
        "date": "2022-02-04",
        "calories": 1550.63347664731,
        "meals": [
          {
            "id": "TWVhbDoyNjAyNjcw",
            "calories": 516.638425,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Raspberry Coconut Parfait",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 256.91,
                "saturatedFat": 29.59
              },
              "nutrientsPerServing": {
                "calories": 516.64,
                "carbs": 64.23
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjcx",
            "calories": 208.8446,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Beet And Carrot Juice",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 158.11,
                "saturatedFat": 1.07
              },
              "nutrientsPerServing": {
                "calories": 208.84,
                "carbs": 39.53
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjcy",
            "calories": 559.96372699175,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Oat Porridge With Egg And Baked Vegetables",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 278.4,
                "saturatedFat": 38.41
              },
              "nutrientsPerServing": {
                "calories": 559.96,
                "carbs": 69.6
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjcz",
            "calories": 265.186724655558,
            "meal": "dinner",
            "numOfServings": 1,
            "recipe": {
              "name": "Veggie Chicken Meal Prep Bowls Recipes",
              "numberOfServings": 5,
              "caloriesPerServing": {
                "carbs": 65.42,
                "saturatedFat": 27.54
              },
              "nutrientsPerServing": {
                "calories": 265.19,
                "carbs": 16.35
              }
            }
          }
        ]
      },
      {
        "day": 2,
        "date": "2022-02-03",
        "calories": 1557.36107288583,
        "meals": [
          {
            "id": "TWVhbDoyNjAyNjY2",
            "calories": 562.934717636,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Savory Summer Squash Waffles",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 122.98,
                "saturatedFat": 33.71
              },
              "nutrientsPerServing": {
                "calories": 562.93,
                "carbs": 30.74
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjY3",
            "calories": 154.027677840875,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Kale Smoothie With Orange And Pear",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 114.27,
                "saturatedFat": 2.25
              },
              "nutrientsPerServing": {
                "calories": 154.03,
                "carbs": 28.57
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjY4",
            "calories": 468.783429108958,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Smoked Mackerel Salad With Fennel And Apple",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 229.49,
                "saturatedFat": 26.69
              },
              "nutrientsPerServing": {
                "calories": 468.78,
                "carbs": 57.37
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjY5",
            "calories": 371.6152483,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Rancho De Chimayó Posole",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 42.93,
                "saturatedFat": 32.54
              },
              "nutrientsPerServing": {
                "calories": 185.81,
                "carbs": 10.73
              }
            }
          }
        ]
      },
      {
        "day": 1,
        "date": "2022-02-02",
        "calories": 1552.10078507105,
        "meals": [
          {
            "id": "TWVhbDoyNjAyNjYy",
            "calories": 435.339976666667,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Kiwi Smoothie Bowl",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 233.29,
                "saturatedFat": 163.34
              },
              "nutrientsPerServing": {
                "calories": 448.95,
                "carbs": 58.32
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjYz",
            "calories": 220.5499,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Easy Fruit Salad",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 204.89,
                "saturatedFat": 1.12
              },
              "nutrientsPerServing": {
                "calories": 220.55,
                "carbs": 51.22
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjY0",
            "calories": 511.009576873,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Mediterranean Salmon Kabobs",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 185.95,
                "saturatedFat": 26.2
              },
              "nutrientsPerServing": {
                "calories": 511.01,
                "carbs": 46.49
              }
            }
          },
          {
            "id": "TWVhbDoyNjAyNjY1",
            "calories": 385.201331531379,
            "meal": "dinner",
            "numOfServings": 2,
            "recipe": {
              "name": "Thai Green Curry",
              "numberOfServings": 6,
              "caloriesPerServing": {
                "carbs": 42.61,
                "saturatedFat": 62.71
              },
              "nutrientsPerServing": {
                "calories": 192.6,
                "carbs": 10.65
              }
            }
          }
        ]
      },
      {
        "day": 1,
        "date": "2022-01-14",
        "calories": 928.730224274375,
        "meals": [
          {
            "id": "TWVhbDoyMzM5ODA5",
            "calories": 414.554124274375,
            "meal": "lunch",
            "numOfServings": 2,
            "recipe": {
              "name": "Caprese-Style Salad With Chicken",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 102.83,
                "saturatedFat": 35.72
              },
              "nutrientsPerServing": {
                "calories": 414.55,
                "carbs": 25.71
              }
            }
          },
          {
            "id": "TWVhbDoyMzM5ODEw",
            "calories": 514.1761,
            "meal": "snack",
            "numOfServings": 3,
            "recipe": {
              "name": "Apple-Orange Smoothie With Yogurt",
              "numberOfServings": 1,
              "caloriesPerServing": {
                "carbs": 292.81,
                "saturatedFat": 93.42
              },
              "nutrientsPerServing": {
                "calories": 514.18,
                "carbs": 73.2
              }
            }
          }
        ]
      },
      {
        "day": 1,
        "date": "2022-01-13",
        "calories": 1433.51177994771,
        "meals": [
          {
            "id": "TWVhbDoyMzI4NTA3",
            "calories": 656.555798125,
            "meal": "breakfast",
            "numOfServings": 2,
            "recipe": {
              "name": "Huevos Rancheros",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 204.7,
                "saturatedFat": 122.18
              },
              "nutrientsPerServing": {
                "calories": 656.56,
                "carbs": 51.18
              }
            }
          },
          {
            "id": "TWVhbDoyMzI4NTA4",
            "calories": 223.376733333333,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Refreshing Red Berry Smoothie",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 208.28,
                "saturatedFat": 0.82
              },
              "nutrientsPerServing": {
                "calories": 223.38,
                "carbs": 52.07
              }
            }
          },
          {
            "id": "TWVhbDoyMzI4NTA5",
            "calories": 496.019823489375,
            "meal": "lunch",
            "numOfServings": 2,
            "recipe": {
              "name": "Power Pesto With Roasted Vegetables",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 67.39,
                "saturatedFat": 18.14
              },
              "nutrientsPerServing": {
                "calories": 248.01,
                "carbs": 16.85
              }
            }
          },
          {
            "id": "TWVhbDoyMzI4NTEw",
            "calories": 57.559425,
            "meal": "dinner",
            "numOfServings": 3,
            "recipe": {
              "name": "Simple Grilled Ahi Tuna Steaks",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 7,
                "saturatedFat": 7.12
              },
              "nutrientsPerServing": {
                "calories": 57.56,
                "carbs": 1.75
              }
            }
          }
        ]
      },
      {
        "day": 3,
        "date": "2022-01-12",
        "calories": 1600.23371126703,
        "meals": [
          {
            "id": "TWVhbDoyMjQyODkw",
            "calories": 583.135846165,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Pumpkin Scrambled Eggs With Almonds And Apricot",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 177.49,
                "saturatedFat": 50.24
              },
              "nutrientsPerServing": {
                "calories": 583.14,
                "carbs": 44.37
              }
            }
          },
          {
            "id": "TWVhbDoyMjQyODkx",
            "calories": 154.027677840875,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Kale Smoothie With Orange And Pear",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 114.27,
                "saturatedFat": 2.25
              },
              "nutrientsPerServing": {
                "calories": 154.03,
                "carbs": 28.57
              }
            }
          },
          {
            "id": "TWVhbDoyMjQyODky",
            "calories": 585,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Nori Rolls With Tahini Dressing",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 114,
                "saturatedFat": 57.6
              },
              "nutrientsPerServing": {
                "calories": 585,
                "carbs": 28.5
              }
            }
          },
          {
            "id": "TWVhbDoyMjQyODkz",
            "calories": 278.070187261156,
            "meal": "dinner",
            "numOfServings": 1,
            "recipe": {
              "name": "Cod Portuguese",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 51.78,
                "saturatedFat": 11.62
              },
              "nutrientsPerServing": {
                "calories": 278.07,
                "carbs": 12.94
              }
            }
          }
        ]
      },
      {
        "day": 2,
        "date": "2022-01-11",
        "calories": 1632.2914783704,
        "meals": [
          {
            "id": "TWVhbDoyMjQyODg2",
            "calories": 586.667427461646,
            "meal": "breakfast",
            "numOfServings": 1,
            "recipe": {
              "name": "Chorizo, Pepper, And Avocado Skillet",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 79.87,
                "saturatedFat": 104.14
              },
              "nutrientsPerServing": {
                "calories": 586.67,
                "carbs": 19.97
              }
            }
          },
          {
            "id": "TWVhbDoyMjQyODg3",
            "calories": 220.5499,
            "meal": "snack",
            "numOfServings": 1,
            "recipe": {
              "name": "Easy Fruit Salad",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 204.89,
                "saturatedFat": 1.12
              },
              "nutrientsPerServing": {
                "calories": 220.55,
                "carbs": 51.22
              }
            }
          },
          {
            "id": "TWVhbDoyMjQyODg4",
            "calories": 550.998011592167,
            "meal": "lunch",
            "numOfServings": 1,
            "recipe": {
              "name": "Southwestern Taco Bowl",
              "numberOfServings": 2,
              "caloriesPerServing": {
                "carbs": 214.37,
                "saturatedFat": 87.82
              },
              "nutrientsPerServing": {
                "calories": 551,
                "carbs": 53.59
              }
            }
          },
          {
            "id": "TWVhbDoyMjQyODg5",
            "calories": 274.076139316583,
            "meal": "dinner",
            "numOfServings": 1,
            "recipe": {
              "name": "Savory Scallop Pasta",
              "numberOfServings": 4,
              "caloriesPerServing": {
                "carbs": 62.07,
                "saturatedFat": 47.78
              },
              "nutrientsPerServing": {
                "calories": 274.08,
                "carbs": 15.52
              }
            }
          }
        ]
      }
    ]
  }
}

Find all the steps detailed below in this . Modify the code accordingly.

In the case of the example, use the query to find vegan recipes:

graphqlbin
recipeSearch
recipe
mealPlanTemplates
generateMealPlan
mealPlan
createMealPlanTemplate