Add Favorite Recipe

Use the userFavoriteRecipe mutation to set a recipe as a user's favorite.

To obtain a list of the user's favorite recipes, use the myFavoriteRecipes query.

Required Argument

Argument

Type

Description

recipeId

ID

UUID (databaseId)

Available Fields

Response returns isUserFavorite bool field

Field Name

Type

Description

success

Boolean

True if the recipe has been set as favorite. Otherwise is False

isUserFavorite

Boolean

True if the recipe has been set as a favorite for the given user. Otherwise is False

Example

mutation {
  userFavoriteRecipe(recipeId: "e82a53c7-d7e8-4c5a-b31b-b217ad3a736a") {
    success
    isUserFavorite
  }
}

Last updated