Create a User Recipe

Create your own recipe

Use the createMyRecipe mutation to create a new user recipe.

These recipes are associated with the user's profile and can only be seen and used by them. You can query for a user's recipes using myRecipes query.

You may add the recipe object to the mutation's response to geting additional data about the created recipe, such as its id.

User recipes cannot be added or used in the meal plan.

Prerequisites

Available Arguments

Available Fields

The following field will be part of the response.

Example

The following example create a recipe. As a part of the response, the id and name of the recipe are returned.

mutation createMyRecipe {
  createMyRecipe(
    input: {
      name: "Fried Chicken"
      tags: ["tag1", "tag2"]
      ingredientLines: ["Line1", "Line2"]
      ingredients: [
        { foodId: "QnJhbmRlZEZvb2ROb2RlOjE3NTgwNTM3LTQ0YTItNDdjOS05ODg1LWQ1YjIwNGM4NWRmZg==", grams: 10}
      ]
      numberOfServings: 2
      cuisines: "Mexican"
      mealTimes: [DINNER, LUNCH]
      courses: "Main Dish"
      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."
    }
  ) {
    success
    message
     recipe { id name }
  }
}

Last updated