Update Profile

Update user's profile

General profile attributes can be updated through this mutation.

Available Arguments

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

Arguments

Type

Description

name

string

User's name

email

string

User's email address, which is unique and used to log in to the Suggestic app.

timezone

String

It can be any name in the list of database time zones. For example: "America/Los_Angeles": https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

birthdate

Date

The user's birthday in YYYY-MM-DD format. Ex: "1984-08-23"

language

String

User language preference. Possible values:

EN: English

ES: Spanish

NL: Dutch

AR: Arabic BE: English-UK

favoriteCuisines

[String]

User's favorite cuisines.

enabledTrackers

[TrackerComponent]

Filters the displayed trackers based on the selected values. Leave empty to show all trackers enabled by default.

enum TrackerComponent { BLOOD_PRESSURE_TRACKER DAILY_MOOD DAILY_RECAP EXERCISE_TRACKER FOOD_LOGS FOOD_LOG_MEAL_TRACKER HEART_RATE_TRACKER HRV_TRACKER HYDRATION_TRACKER MP_MEAL_TRACKER MY_CHECKLIST_TRACKER PLAN_SUPPLEMENT PLAN_SUPPLEMENTS_MY_CHECKLIST SLEEP_QUALITY_SCORE_TRACKER SLEEP_TIME_TRACKER STEPS_TRACKER TODAY_FOOD TODAY_SUPPLEMENT WEIGHT_TRACKER }

Examples

Example: Update user's "name" and "email

mutation {
  updateProfile(name: "LilianaI", email: "[email protected]") {
    success
    errors {
      field
    }
  }
}

Example: Update user language to Spanish

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

Example: Update user favorite cuisines

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

Example: Display selected trackers

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

Last updated

Was this helpful?