# Update Profile

General profile attributes can be updated through this mutation.&#x20;

## Available Arguments

Even though the following arguments are not required, add at least one of them.

<table data-header-hidden><thead><tr><th width="219">Arguments</th><th width="150">Type</th><th width="318.91739894551847">Description</th></tr></thead><tbody><tr><td><strong>Arguments</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>name</code></td><td>string</td><td>User's name</td></tr><tr><td><code>email</code></td><td>string</td><td>User's email address, which is unique and used to log in to the Suggestic app.</td></tr><tr><td><code>timezone</code></td><td>String</td><td>It can be any name in the list of database time zones. For example: "America/Los_Angeles":<br><a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</a></td></tr><tr><td><code>birthdate</code></td><td>Date</td><td>The user's birthday in <code>YYYY-MM-DD</code> format. Ex: "1984-08-23"</td></tr><tr><td><code>language</code></td><td>String</td><td><p>User language preference. Possible values:</p><p><code>EN</code>: English</p><p><code>ES</code>: Spanish</p><p><code>NL</code>: Dutch</p><p><code>AR</code>: Arabic<br><code>BE</code>: English-UK<br><code>DE</code>: German<br><code>CS</code>: Czech</p></td></tr><tr><td><code>favoriteCuisines</code></td><td>[String]</td><td>User's favorite <a href="../../../objects/recipe/recipe-object/cuisines">cuisines</a>.</td></tr><tr><td><code>enabledTrackers</code></td><td>[TrackerComponent]</td><td><p>Filters the displayed trackers based on the selected values. Leave empty to show all trackers enabled by default.</p><p><br>enum TrackerComponent {<br>BLOOD_PRESSURE_TRACKER<br>DAILY_MOOD<br>DAILY_RECAP<br>EXERCISE_TRACKER<br>FOOD_LOGS<br>FOOD_LOG_MEAL_TRACKER<br>HEART_RATE_TRACKER<br>HRV_TRACKER<br>HYDRATION_TRACKER<br>MP_MEAL_TRACKER<br>MY_CHECKLIST_TRACKER<br>PLAN_SUPPLEMENT<br>PLAN_SUPPLEMENTS_MY_CHECKLIST<br>SLEEP_QUALITY_SCORE_TRACKER<br>SLEEP_TIME_TRACKER<br>STEPS_TRACKER<br>TODAY_FOOD<br>TODAY_SUPPLEMENT<br>WEIGHT_TRACKER<br>}</p></td></tr></tbody></table>

## Examples

### Example: Update user's "name" and "email&#x20;

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

```graphql
mutation {
  updateProfile(name: "LilianaI", email: "liliana@suggestic.com") {
    success
    errors {
      field
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "updateProfile": {
      "success": true,
      "errors": []
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Example: Update user language to Spanish

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

```graphql
mutation {
  updateProfile(language: ES) {
    success
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "updateProfile": {
      "success": true
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Example: Update user favorite cuisines

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

```graphql
mutation {
  updateProfile(favoriteCuisines:["Indian","Mexican","American"]) {
    success
    errors {
      field
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "updateProfile": {
      "success": true,
      "errors": []
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Example: Display selected trackers

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

```graphql
mutation ($enabledTrackers: [TrackerComponent!]){
  updateProfile(enabledTrackers: $enabledTrackers) {
    success
    errors { field messages }
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```graphql
{"enabledTrackers": ["STEPS_TRACKER", "EXERCISE_TRACKER"]}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "updateProfile": {
      "success": true,
      "errors": []
    }
  }
}
```

{% endtab %}
{% endtabs %}
