# User's Recipes

The `myRecipe` query list the information of all recipes created by the user. In addition, search a user recipe by adding a b64id.\
\
These recipes have to be previously created by using the [createMyRecipe](/graphql/query/mutations/food-log/users-foods-and-recipes/create-a-user-recipe.md).&#x20;

## Available Argument

| Name | Type   | Description                                                                        |
| ---- | ------ | ---------------------------------------------------------------------------------- |
| `Id` | String | Unique user's recipe ID to search. Use a UserRecipe by b64id. *Optional argument.* |

## Available Fields

| Field Name            | Type                                                                                       | Description                                                                                |
| --------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `Id`                  | ID                                                                                         | Unique Id of the user's recipe                                                             |
| `ingredients`         | [ingredients](https://docs.suggestic.com/graphql/objects/food-logs/ingredients)            | Object that retrieves the information of the recipe ingredients                            |
| `ingredientLines`     | \[String]                                                                                  | <p>Complete ingredient lines including quantity</p><p>E.g. 1/4 cup coconut oil, melted</p> |
| `numberOfServings`    | Int                                                                                        | Original recipe number of servings                                                         |
| `instructions`        | \[String]                                                                                  | An array of cooking instruction lines.                                                     |
| `mealTimes`           | [mealTimes](https://docs.suggestic.com/graphql/objects/common/meal-times)                  | Meal of the day.  Possible Values:`BREAKFAST`, `LUNCH`, `DINNER`, `SNACK`                  |
| `courses`             | \[String]                                                                                  | Tags representing the courses associated with the recipe.                                  |
| `cuisines`            | \[String]                                                                                  | Tags representing the cuisines associated with the recipe.                                 |
| `servingWeight`       | Float                                                                                      | Weight, in grams, of each serving                                                          |
| `weightInGrams`       | Float                                                                                      | Total weight of the recipe expressed in grams                                              |
| `ingredients`         | [IngredientAmount](https://docs.suggestic.com/graphql/objects/food-logs/ingredient-amount) | An object that includes the ingredient amount for a given food.                            |
| `nutrientsPerServing` | [nutrientsPerServing](/graphql/objects/recipe/nutrientsperserving.md)                      | Nutritional information per serving                                                        |
| `nutrients`           | [nutrients](https://docs.suggestic.com/graphql/objects/food-logs/nutrients)                | Object that retrieves the information of the nutrients of the food.                        |

## Example

### Get all the user's recipes created&#x20;

{% tabs %}
{% tab title="Query" %}

```graphql
query {
  myRecipes {
    edges {
      node {
        name
        id
        ingredientLines
        numberOfServings
        instructions
        mealTimes
        courses
        cuisines
        servingWeight
        weightInGrams
        nutrients {
          name
          amount
          unit
        }
        nutrientsPerServing {
          name
          amount
          unit
        }
      }
    }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "myRecipes": {
      "edges": [
        {
          "node": {
            "id": "VXNlclJlY2lwZTphNXNKWVh3QlY0Q1V6aWdSNkhaeg==",
            "name": "Fried Chicken",
            "ingredientLines": [
              "Line1",
              "Line2"
            ],
            "numberOfServings": 2,
            "instructions": "In a large bowl, beat the eggs. In another bowl, combine the salt, pepper, garlic powder and paprika to make a seasoned salt. Add the flour to a third bowl.",
            "mealTimes": [
              "DINNER",
              "LUNCH"
            ],
            "courses": [
              "Main Dish"
            ],
            "cuisines": [
              "Mexican"
            ],
            "servingWeight": 12.5,
            "weightInGrams": 25,
            "nutrients": [
              {
                "name": "Folate, total",
                "amount": 35,
                "unit": "G"
              },
              {
                "name": "Protein",
                "amount": 22.296,
                "unit": "G"
              },
              {
                "name": "Ash",
                "amount": 2.296,
                "unit": "G"
              },
              {
                "name": "Total lipid (fat)",
                "amount": 9,
                "unit": "G"
              },
              {
                "name": "Carbohydrate, by difference",
                "amount": 123.368,
                "unit": "G"
              },
              {
                "name": "Niacin",
                "amount": 0.88,
                "unit": "G"
              },
              {
                "name": "Pantothenic acid",
                "amount": 0.2,
                "unit": "G"
              },
              {
                "name": "Vitamin B-6",
                "amount": 0.032,
                "unit": "G"
              },
              {
                "name": "Water",
                "amount": 33.2,
                "unit": "G"
              },
              {
                "name": "Calcium, Ca",
                "amount": 222,
                "unit": "G"
              },
              {
                "name": "Potassium, K",
                "amount": 421,
                "unit": "G"
              },
              {
                "name": "Zinc, Zn",
                "amount": 0.072,
                "unit": "G"
              },
              {
                "name": "Isoleucine",
                "amount": 0.312,
                "unit": "G"
              },
              {
                "name": "Leucine",
                "amount": 0.48,
                "unit": "G"
              },
              {
                "name": "Lysine",
                "amount": 0.36,
                "unit": "G"
              },
              {
                "name": "Cystine",
                "amount": 0.144,
                "unit": "G"
              },
              {
                "name": "Valine",
                "amount": 0.36,
                "unit": "G"
              },
              {
                "name": "Arginine",
                "amount": 0.304,
                "unit": "G"
              },
              {
                "name": "Histidine",
                "amount": 0.136,
                "unit": "G"
              },
              {
                "name": "Aspartic acid",
                "amount": 0.536,
                "unit": "G"
              },
              {
                "name": "Serine",
                "amount": 0.384,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total monounsaturated",
                "amount": 0.072,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total polyunsaturated",
                "amount": 0.368,
                "unit": "G"
              },
              {
                "name": "Selenium, Se",
                "amount": 7.296,
                "unit": "G"
              },
              {
                "name": "Vitamin B-12",
                "amount": 0.056,
                "unit": "G"
              },
              {
                "name": "Folate, DFE",
                "amount": 57,
                "unit": "G"
              },
              {
                "name": "Energy",
                "amount": 1456.584,
                "unit": "KCAL"
              },
              {
                "name": "Vitamin A, RAE",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Phosphorus, P",
                "amount": 324,
                "unit": "G"
              },
              {
                "name": "Vitamin D (D2 + D3), International Units",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Sugars, total including NLEA",
                "amount": 21.304,
                "unit": "G"
              },
              {
                "name": "Fiber, soluble",
                "amount": 2,
                "unit": "G"
              },
              {
                "name": "Sugars, added",
                "amount": 18,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total trans",
                "amount": 0,
                "unit": "G"
              }
            ],
            "nutrientsPerServing": [
              {
                "name": "Folate, total",
                "amount": 4.375,
                "unit": "G"
              },
              {
                "name": "Folic acid",
                "amount": 4,
                "unit": "G"
              },
              {
                "name": "Glycine",
                "amount": 0.025,
                "unit": "G"
              },
              {
                "name": "Proline",
                "amount": 0.04,
                "unit": "G"
              },
              {
                "name": "Cholesterol",
                "amount": 2,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total saturated",
                "amount": 0.22,
                "unit": "G"
              },
              {
                "name": "Protein",
                "amount": 2.787,
                "unit": "G"
              },
              {
                "name": "Ash",
                "amount": 0.287,
                "unit": "G"
              },
              {
                "name": "Total lipid (fat)",
                "amount": 1.125,
                "unit": "G"
              },
              {
                "name": "Carbohydrate, by difference",
                "amount": 15.421,
                "unit": "G"
              },
              {
                "name": "Niacin",
                "amount": 0.11,
                "unit": "G"
              },
              {
                "name": "Pantothenic acid",
                "amount": 0.025,
                "unit": "G"
              },
              {
                "name": "Vitamin B-6",
                "amount": 0.004,
                "unit": "G"
              },
              {
                "name": "Water",
                "amount": 4.15,
                "unit": "G"
              },
              {
                "name": "Calcium, Ca",
                "amount": 27.75,
                "unit": "G"
              },
              {
                "name": "Potassium, K",
                "amount": 52.625,
                "unit": "G"
              },
              {
                "name": "Zinc, Zn",
                "amount": 0.009000000000000001,
                "unit": "G"
              },
              {
                "name": "Isoleucine",
                "amount": 0.039,
                "unit": "G"
              },
              {
                "name": "Leucine",
                "amount": 0.06,
                "unit": "G"
              },
              {
                "name": "Lysine",
                "amount": 0.045,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total trans",
                "amount": 0,
                "unit": "G"
              }
            ]
          }
        },
        {
          "node": {
            "id": "VXNlclJlY2lwZTpCbFVKWVh3QkZ4bmZEbThWempFVA==",
            "name": "Fried Chicken",
            "ingredientLines": [
              "Line1",
              "Line2"
            ],
            "numberOfServings": 2,
            "instructions": "In a large bowl, beat the eggs. In another bowl, combine the salt, pepper, garlic powder and paprika to make a seasoned salt. Add the flour to a third bowl.",
            "mealTimes": [
              "DINNER",
              "LUNCH"
            ],
            "courses": [
              "Main Dish"
            ],
            "cuisines": [
              "Mexican"
            ],
            "servingWeight": 12.5,
            "weightInGrams": 25,
            "nutrients": [
              {
                "name": "Folate, total",
                "amount": 35,
                "unit": "G"
              },
              {
                "name": "Folic acid",
                "amount": 32,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total polyunsaturated",
                "amount": 0.368,
                "unit": "G"
              },
              {
                "name": "Selenium, Se",
                "amount": 7.296,
                "unit": "G"
              },
              {
                "name": "Vitamin B-12",
                "amount": 0.056,
                "unit": "G"
              },
              {
                "name": "Folate, DFE",
                "amount": 57,
                "unit": "G"
              },
              {
                "name": "Energy",
                "amount": 1456.584,
                "unit": "KCAL"
              },
              {
                "name": "Vitamin A, RAE",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Phosphorus, P",
                "amount": 324,
                "unit": "G"
              },
              {
                "name": "Vitamin D (D2 + D3), International Units",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Sugars, total including NLEA",
                "amount": 21.304,
                "unit": "G"
              },
              {
                "name": "Fiber, soluble",
                "amount": 2,
                "unit": "G"
              },
              {
                "name": "Sugars, added",
                "amount": 18,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total trans",
                "amount": 0,
                "unit": "G"
              }
            ],
            "nutrientsPerServing": [
              {
                "name": "Folate, total",
                "amount": 4.375,
                "unit": "G"
              },
              {
                "name": "Folic acid",
                "amount": 4,
                "unit": "G"
              },
              {
                "name": "Retinol",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Vitamin C, total ascorbic acid",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Thiamin",
                "amount": 0.013000000000000001,
                "unit": "G"
              },
              {
                "name": "Riboflavin",
                "amount": 0.062,
                "unit": "G"
              },
              {
                "name": "Fiber, total dietary",
                "amount": 1.013,
                "unit": "G"
              },
              {
                "name": "Iron, Fe",
                "amount": 0.475,
                "unit": "G"
              },
              {
                "name": "Magnesium, Mg",
                "amount": 1.5,
                "unit": "G"
              },
              {
                "name": "Sodium, Na",
                "amount": 132.5,
                "unit": "G"
              },
              {
                "name": "Copper, Cu",
                "amount": 0.01,
                "unit": "G"
              },
              {
                "name": "Manganese, Mn",
                "amount": 0.01,
                "unit": "G"
              },
              {
                "name": "Vitamin A, IU",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Folate, food",
                "amount": 0.375,
                "unit": "G"
              },
              {
                "name": "Tryptophan",
                "amount": 0.01,
                "unit": "G"
              },
              {
                "name": "Threonine",
                "amount": 0.031,
                "unit": "G"
              },
              {
                "name": "Methionine",
                "amount": 0.023,
                "unit": "G"
              },
              {
                "name": "Phenylalanine",
                "amount": 0.042,
                "unit": "G"
              },
              {
                "name": "Tyrosine",
                "amount": 0.027,
                "unit": "G"
              },
              {
                "name": "Alanine",
                "amount": 0.038,
                "unit": "G"
              },
              {
                "name": "Glutamic acid",
                "amount": 0.128,
                "unit": "G"
              },
              {
                "name": "Glycine",
                "amount": 0.025,
                "unit": "G"
              },
              {
                "name": "Proline",
                "amount": 0.04,
                "unit": "G"
              },
              {
                "name": "Sugars, added",
                "amount": 2.25,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total trans",
                "amount": 0,
                "unit": "G"
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Get a user's recipe by given a specific ID.

{% tabs %}
{% tab title="Query" %}

```graphql
query {
  myRecipes (id:"VXNlclJlY2lwZTphNXNKWVh3QlY0Q1V6aWdSNkhaeg==") {
    edges {
      node {
        name
        ingredientLines
        numberOfServings
        instructions
        mealTimes
        courses
        cuisines
        servingWeight
        weightInGrams
        nutrients {
          name
          amount
          unit
        }
        nutrientsPerServing {
          name
          amount
          unit
        }
      }
    }
  }
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "myRecipes": {
      "edges": [
        {
          "node": {
            "name": "Fried Chicken",
            "ingredientLines": [
              "Line1",
              "Line2"
            ],
            "numberOfServings": 2,
            "instructions": "In a large bowl, beat the eggs. In another bowl, combine the salt, pepper, garlic powder and paprika to make a seasoned salt. Add the flour to a third bowl.",
            "mealTimes": [
              "DINNER",
              "LUNCH"
            ],
            "courses": [
              "Main Dish"
            ],
            "cuisines": [
              "Mexican"
            ],
            "servingWeight": 12.5,
            "weightInGrams": 25,
            "nutrients": [
              {
                "name": "Folate, total",
                "amount": 35,
                "unit": "G"
              },
              {
                "name": "Carbohydrate, by difference",
                "amount": 123.368,
                "unit": "G"
              },
              {
                "name": "Niacin",
                "amount": 0.88,
                "unit": "G"
              },
              {
                "name": "Pantothenic acid",
                "amount": 0.2,
                "unit": "G"
              },
              {
                "name": "Vitamin B-6",
                "amount": 0.032,
                "unit": "G"
              },
              {
                "name": "Water",
                "amount": 33.2,
                "unit": "G"
              },
              {
                "name": "Calcium, Ca",
                "amount": 222,
                "unit": "G"
              },
              {
                "name": "Potassium, K",
                "amount": 421,
                "unit": "G"
              },
              {
                "name": "Zinc, Zn",
                "amount": 0.072,
                "unit": "G"
              },
              {
                "name": "Isoleucine",
                "amount": 0.312,
                "unit": "G"
              },
              {
                "name": "Leucine",
                "amount": 0.48,
                "unit": "G"
              },
              {
                "name": "Lysine",
                "amount": 0.36,
                "unit": "G"
              },
              {
                "name": "Cystine",
                "amount": 0.144,
                "unit": "G"
              },
              {
                "name": "Valine",
                "amount": 0.36,
                "unit": "G"
              },
              {
                "name": "Arginine",
                "amount": 0.304,
                "unit": "G"
              },
              {
                "name": "Histidine",
                "amount": 0.136,
                "unit": "G"
              },
              {
                "name": "Aspartic acid",
                "amount": 0.536,
                "unit": "G"
              },
              {
                "name": "Serine",
                "amount": 0.384,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total monounsaturated",
                "amount": 0.072,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total polyunsaturated",
                "amount": 0.368,
                "unit": "G"
              },
              {
                "name": "Selenium, Se",
                "amount": 7.296,
                "unit": "G"
              },
              {
                "name": "Vitamin B-12",
                "amount": 0.056,
                "unit": "G"
              },
              {
                "name": "Folate, DFE",
                "amount": 57,
                "unit": "G"
              },
              {
                "name": "Energy",
                "amount": 1456.584,
                "unit": "KCAL"
              },
              {
                "name": "Vitamin A, RAE",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Phosphorus, P",
                "amount": 324,
                "unit": "G"
              },
              {
                "name": "Vitamin D (D2 + D3), International Units",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Sugars, total including NLEA",
                "amount": 21.304,
                "unit": "G"
              },
              {
                "name": "Fiber, soluble",
                "amount": 2,
                "unit": "G"
              },
              {
                "name": "Sugars, added",
                "amount": 18,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total trans",
                "amount": 0,
                "unit": "G"
              }
            ],
            "nutrientsPerServing": [
              {
                "name": "Folate, total",
                "amount": 4.375,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total saturated",
                "amount": 0.22,
                "unit": "G"
              },
              {
                "name": "Protein",
                "amount": 2.787,
                "unit": "G"
              },
              {
                "name": "Ash",
                "amount": 0.287,
                "unit": "G"
              },
              {
                "name": "Total lipid (fat)",
                "amount": 1.125,
                "unit": "G"
              },
              {
                "name": "Carbohydrate, by difference",
                "amount": 15.421,
                "unit": "G"
              },
              {
                "name": "Niacin",
                "amount": 0.11,
                "unit": "G"
              },
              {
                "name": "Pantothenic acid",
                "amount": 0.025,
                "unit": "G"
              },
              {
                "name": "Vitamin B-6",
                "amount": 0.004,
                "unit": "G"
              },
              {
                "name": "Water",
                "amount": 4.15,
                "unit": "G"
              },
              {
                "name": "Calcium, Ca",
                "amount": 27.75,
                "unit": "G"
              },
              {
                "name": "Potassium, K",
                "amount": 52.625,
                "unit": "G"
              },
              {
                "name": "Zinc, Zn",
                "amount": 0.009000000000000001,
                "unit": "G"
              },
              {
                "name": "Isoleucine",
                "amount": 0.039,
                "unit": "G"
              },
              {
                "name": "Leucine",
                "amount": 0.06,
                "unit": "G"
              },
              {
                "name": "Lysine",
                "amount": 0.045,
                "unit": "G"
              },
              {
                "name": "Cystine",
                "amount": 0.018,
                "unit": "G"
              },
              {
                "name": "Valine",
                "amount": 0.045,
                "unit": "G"
              },
              {
                "name": "Arginine",
                "amount": 0.038,
                "unit": "G"
              },
              {
                "name": "Histidine",
                "amount": 0.017,
                "unit": "G"
              },
              {
                "name": "Aspartic acid",
                "amount": 0.067,
                "unit": "G"
              },
              {
                "name": "Serine",
                "amount": 0.048,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total monounsaturated",
                "amount": 0.009000000000000001,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total polyunsaturated",
                "amount": 0.046,
                "unit": "G"
              },
              {
                "name": "Selenium, Se",
                "amount": 0.912,
                "unit": "G"
              },
              {
                "name": "Vitamin B-12",
                "amount": 0.007,
                "unit": "G"
              },
              {
                "name": "Folate, DFE",
                "amount": 7.125,
                "unit": "G"
              },
              {
                "name": "Energy",
                "amount": 182.07299999999998,
                "unit": "KCAL"
              },
              {
                "name": "Vitamin A, RAE",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Phosphorus, P",
                "amount": 40.5,
                "unit": "G"
              },
              {
                "name": "Vitamin D (D2 + D3), International Units",
                "amount": 0,
                "unit": "G"
              },
              {
                "name": "Sugars, total including NLEA",
                "amount": 2.6630000000000003,
                "unit": "G"
              },
              {
                "name": "Fiber, soluble",
                "amount": 0.25,
                "unit": "G"
              },
              {
                "name": "Sugars, added",
                "amount": 2.25,
                "unit": "G"
              },
              {
                "name": "Fatty acids, total trans",
                "amount": 0,
                "unit": "G"
              }
            ]
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Get the ingredients information of a given recipe

{% tabs %}
{% tab title="Query" %}

```graphql
query {
  myRecipes (id:"VXNlclJlY2lwZTpxMWtocVh3QmI0RHRoTlZhaDVLeQ==")
  {
    edges {
      node {
      id
        name
        ingredientLines
        ingredients {
          foodId
          name
          grams
        }
        numberOfServings
      }
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "myRecipes": {
      "edges": [
        {
          "node": {
            "id": "VXNlclJlY2lwZTpxMWtocVh3QmI0RHRoTlZhaDVLeQ==",
            "name": "Diet Cookies",
            "ingredientLines": [
              "flour",
              "Sugar"
            ],
            "ingredients": [
              {
                "foodId": "QnJhbmRlZEZvb2ROb2RlOjE3NTgwNTM3LTQ0YTItNDdjOS05ODg1LWQ1YjIwNGM4NWRmZg==",
                "name": "Diet Cookies",
                "grams": 5
              }
            ],
            "numberOfServings": 3
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/query/queries/food-log/users-foods-and-recipes/users-recipes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
