# Simple Meal Plan Filters

The `filters` object filters and create a simple meal plan with specific information such as *caloric range* and *tags* per each meal plan, meaning `breakfast`, `lunch`, `snack`, and `dinner`. For instance, it is possible to create a filter that returns all the recipes tagged with "keto" and with a specific range of calories.&#x20;

It is not necessary to define all the meal times for each filter. For instance, if the following filter is defined:

```graphql
filters: {
      kcalRange: {
        breakfast: { min: 100, max: 500 }
        lunch: { min: 100, max: 400 }
        }
  }
```

The caloric range will be only applied to `breakfast` and `lunch`, while `snack` and `dinner` will be created with no caloric range.

**Note:** Use this in the [`generateSimpleMealPlan`](https://docs.suggestic.com/graphql/query/mutations/meal-plan/generate-simple-meal-plan) only.

## Available fields

| **Field Name** | **Type**                  | **Description**                                                                                                                                                                                                                                                                                                                                                                               |
| :------------: | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   `kcalRange`  | RangeByMealTimeInput      | <p>Include the minimun (<code>min</code>) and maximum (<code>max</code>) range of calories pear each meal time. Use the following meal time:<br><strong><code>breakfast</code></strong><br><strong><code>lunch</code></strong><br><strong><code>snack</code></strong><br><strong><code>dinner</code></strong><br>i.e. breakfast should only use recipes with 300-500 calories per serving</p> |
|     `tags`     | TermValuesByMealTimeInput | <p>Predefined tag to be added to use it to filter a meal time Add one or more tags. <br><br>Use the following meal time:<br><strong><code>breakfast</code></strong><br><strong><code>lunch</code></strong><br><strong><code>snack</code></strong><br><strong><code>dinner</code></strong><br>i.e. snacks should only use recipes tagged "salad" or "smoothie"</p>                             |

## Examples

### How to use calorie range and tags

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

```graphql
filters: {
      kcalRange: {
        breakfast: { min: 100, max: 500 }
        lunch: { min: 100, max: 400 }
        snack: { min: 100, max: 300 }
        dinner: { min: 100, max: 400 }
      }
      tags: {
        breakfast: ["healthy"]
        lunch: ["delicious"]
        snack: ["salad"]
        dinner: ["delicious"]
      }
    }
```

{% endtab %}
{% endtabs %}
