# User's Meal Plan Settings (deprecated)

{% hint style="danger" %}
**CAUTION: Legacy Endpoint!**

The `profileMealPlanSettings` mutation has been deprecated. Use the [`updateMealPlanSettings`](https://docs.suggestic.com/graphql/query/mutations/user-profile/update-meal-plan-settings) instead.&#x20;
{% endhint %}

Use the `profileMealPlanSettings` mutation to update a user's meal plan settings.

Set this value to null if you want to "delete" these settings and default to use the user's goals on the meal plan.

To apply these settings to a meal plan, follow the steps below:

1. Execute the `profileMealPlanSettings` mutation.
2. Generate your meal plan by executing the [generateMealPlan mutation](https://docs.suggestic.com/graphql/query/mutations/meal-plan/generate-meal-plan) or the [customMealPlan mutation](https://docs.suggestic.com/graphql/query/queries/meal-plan/meal-plan).
3. Use the [mealPlan ](https://docs.suggestic.com/graphql/query/queries/meal-plan/meal-plan-1)query to obtain the meal plan generated.

### Arguments

| **Arguments** | **Type**       | **Description**                                                                          |
| ------------- | -------------- | ---------------------------------------------------------------------------------------- |
| `calories`    | `Int!`         | Total Calories per day                                                                   |
| `carbsPerc`   | `Float!`       | Percent of Carbs                                                                         |
| `proteinPerc` | `Float!`       | Percent of Protein                                                                       |
| `fatPerc`     | `Float!`       | Percent of Fat                                                                           |
| `omega3Perc`  | `Float`        | Percent of Omega 3. If not included, the planner ignores this constraint.                |
| `format`      | `MealTimeType` | Requested meals per day format, Available options are: `BREAKFAST, SNACK, LUNCH, DINNER` |
| `error`       | `Float!`       | Margin of error (as a percentage) for calories and macros. Default: 0.1                  |

### Example

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

```graphql
mutation {
  profileMealPlanSettings (
    calories: 1500
    carbsPerc: 0.45
    proteinPerc: 0.25
    fatPerc: 0.3
    omega3Perc: 0.09
	  format: [BREAKFAST, SNACK, LUNCH, SNACK, DINNER]
	  error: 0.05
  ) {
      success
  }
}
```

{% endtab %}

{% tab title="Response" %}

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

{% endtab %}
{% endtabs %}
