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

Name

Type

Required?

Description

name

String

Yes

Name of the recipe

courses

String

Yes

Tags representing the courses associated with the recipe. For example Main dishes, Side Dishes, Appetizers, Salads, etc.

cuisines

String

Yes

Tags representing the cuisines associated with the recipe.

ingredientLines

[String]

Yes

Description of the recipe ingredients. Separate them by using commas.

ingredients

Yes

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

instructions

String

Yes

An array of cooking instruction lines.

mealTimes

Yes

Description of the food

numberOfServings

Int

No

Original recipe number of servings

language

Language

No

Language code of the recipe. Possible Values:

  • ES: Spanish

  • EN: English

tags

String

No

Meal tags. Possible values: "VEGETARIAN", "Shake", "PLANT_BASED", "DAIRY_FREE", "VEGAN", "GLUTEN_FREE"

totalTime

String

No

Total preparation and cooking time in text format

E.g., 5 minutes

totalTimeInSeconds

Int

No

Total preparation and cooking time in seconds

mainImage

String

No

Image URL

squareImage

String

No

Image URL

Available Fields

The following field will be part of the response.

Field name

Type

Description

sucess

String

True if the recipe has been created. Otherwise, it displays False

message

String

Description of the result

recipe

Recipe object which returns the information of the recipe.

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