Create User Goal

Use the createUserTracker mutation to set personalized goals for the user across all available trackers.

Required Arguments

Argument

Type

Note

tracker

TrackerComponent!

All trackers available in Suggestic.

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 }

goal

Float

Sets new goal for selected tracker ex. 20000 steps.

source

SourceType

Source of input, default is set to SUGGESTIC. enum SourceType { APPLE FITBIT GARMIN GOOGLEFIT_NATIVE GOOGLEFIT_REST HEALTHCONNECT HUAWEIHEALTH IHEALTH MISFIT OMRONCONNECT OMRONWELLNESS OURA POLAR SAMSUNG STRAVA SUGGESTIC SUUNTO WITHINGS }

Available Fields

Field

Type

Note

success

Boolean

true: If the tracker goal has been created successfully. Otherwise, it displays false

message

String

The message returns either if the goal has been created or not.

tracker

UserTracker

Example

mutation {
  createUserTracker(input: {
    tracker: STEPS_TRACKER
    goal: 20000
    source: SUGGESTIC
  }) {
    success
    message
    tracker {
      id
      tracker
      goal
      source
    }
  }
}

Default goal

Default Goal

New custom goal

New Goal

Last updated

Was this helpful?