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.

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

Object that retrieves the information of the recipe ingredients

ingredientLines

[String]

Complete ingredient lines including quantity

E.g. 1/4 cup coconut oil, melted

numberOfServings

Int

Original recipe number of servings

instructions

[String]

An array of cooking instruction lines.

mealTimes

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

An object that includes the ingredient amount for a given food.

nutrientsPerServing

Nutritional information per serving

nutrients

Object that retrieves the information of the nutrients of the food.

Example

Get all the user's recipes created

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

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

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

Get the ingredients information of a given recipe

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

Last updated