Recipe Swap Options

The recipeSwapOptions query includes the following two objects:

  • onPlan. It retrieves other meals in the existing meal plan for the same mealTime. Generate a meal plan first to have onPlan available recipes. For example, if you are swapping a lunch, this will retrieve all the other lunch options in the existing meal plan.

  • similar. It retrieves all the recipes different than the original but similar in macros. If the user has too many restrictions, no recipes will be listed.

Use both in the recipeSwapOptions query.

Arguments and fields

Define the same arguments and fields for bot objects.

List of Arguments

Argument Name

Type

Description

size

Int

Define the number of returned recipes.

If this parameter is not sent, the default number for similar recipes returned is 6 and for OnPlan recipes retrived 3

List of Fields

Field Name

Type

Description

Recipe

Fields and details of the recipe object

Examples

onPlan Example

   onPlan (size:3) {
      id
      databaseId
      name
      mealTags
      serving
      numberOfServings
      
    }

similar Example

  similar (size:10) {
      id
      databaseId
      name
      mealTags
      serving
      numberOfServings
    }

Last updated