# 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 ](https://docs.suggestic.com/graphql/query/queries/recipes/my-favorite-recipes)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

{% tabs %}
{% tab title="Query" %}

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

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "userFavoriteRecipe": {
      "success": true,
      "isUserFavorite": true
    }
  }
}
```

{% endtab %}
{% endtabs %}
