# Update "Own" Recipe

{% hint style="danger" %}
**CAUTION: Legacy Endpoint!**\
Please refer to the [User's recipe](https://docs.suggestic.com/graphql/query/mutations/food-log/users-foods-and-recipes) documentation for a new and improved way of creating your own recipe for food logging or other purposes.
{% endhint %}

Use the `updateOwnRecipe`mutation to update an "own" recipe for the currently logged user.

| Argument      | Required | Type                                                                                                 | Description                                   |
| ------------- | -------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| `databaseId`  | true     | String!                                                                                              | databaseId of the "own" recipe                |
| `recipeName`  | false    | String!                                                                                              | Name of the "own" recipe                      |
| `ingredients` | false    | \[[OwnRecipeIngredient](https://docs.suggestic.com/graphql/objects/food-logs/own-recipe-ingredient)] | Collection of ingredients of the "own" recipe |
| `quantity`    | false    | Float!                                                                                               | Quantity of the ingredient                    |

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

```graphql
mutation {
  updateOwnRecipe(
    databaseId: "5c9d030a-6a47-11eb-84cf-46e824c1dc9c"
    recipeName: "My Daily Snack"
    quantity: 2
    ingredients: [
      {id: "09038", mealType: USDA_MEAL, quantity: 1, serving: 0},
      {id: "01123", mealType: USDA_MEAL, quantity: 1, serving: 0}
    ]
  ) {
    success
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "updateOwnRecipe": {
      "success": true
    }
  }
}
```

{% endtab %}
{% endtabs %}
