Update a User Recipe

Use the updateMyRecipe mutation to update your own recipe. All the arguments to be sent are optional; however, it will update only the ones send in the mutation. Note that only the owner of the recipe can update it.

Required Arguments

Name

Type

Description

ID

String

Unique Id of the user's recipe. Get the information of all your recipes by executing the myRecipes query.

Input

Object

At least one argument must be sent. See the list of available arguments

Available Arguments

Name

Type

Description

name

String

Name of the recipe

courses

String

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

cuisines

String

Tags representing the cuisines associated with the recipe.

ingredientLines

String

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

ingredients

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

instructions

String

An array of cooking instruction lines.

mealTimes

Description of the food

numberOfServings

Int

Original recipe number of servings

language

Language

Language code of the recipe. Possible Values:

  • ES: Spanish

  • EN: English

tags

String

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

totalTime

String

Total preparation and cooking time in text format

E.g., 5 minutes

totalTimeInSeconds

Int

Total preparation and cooking time in seconds

Available Fields

The following field will be part of the response.

Field name

Type

Description

sucess

String

True if the user's recipe has been updated. Otherwise, it displays False

message

String

Description of the result

Example

mutation updateMyRecipe {
  updateMyRecipe(id:"VXNlclJlY2lwZTphNXNKWVh3QlY0Q1V6aWdSNkhaeg==" 
    input: {
      name: "Fried Chicken"
      tags: ["fried", "chicken"]
      cuisines:"American"
      courses: "Main Dish"
    }
  ) {
    success
    message
  }
}

Execute the myRecipe query to check if the information was updated successfully:

query {
  myRecipes (id:"VXNlclJlY2lwZTphNXNKWVh3QlY0Q1V6aWdSNkhaeg=="){
    edges {
      node {
        id
        name
        tags
        ingredientLines
        numberOfServings
        instructions
        mealTimes
        courses
        cuisines

      }
    }
  }
}

Last updated