User's Goals
Set user weight-related goals
Use the profileMacroGoalsSettings
mutation to determine and set up a user's weight-related goals based on personal information such as weight, height, activity level, etc. Check this information to know which fields are used to calculate a user's caloric daily requirement.
The information is saved and read in the metric unit (kilograms, grams, meters, centimeters, etc). We DO NOT do unit conversions.
You are responsible for Unit Conversion. Make sure your units are correct.
Considerations to calculate your macros
Setup the goals
If goals are set as "on", those will be used. However, If they are not set or are "off" then for meal planning purposes, the meal plan will default to the program's pre-defined goal settings.
The following profile attributes relate to the goals' functionality and can be set directly on the user's profile.
If goals are on and the updateMealPlanSettings
mutation is used, all the information will be overwritten.
Define your macro goals to lose weight
If the goal is to lose weight, your targetWeight
have to be less than the currentWeight
.
Check the following equation:
Then, define the rate to lose weight by choosing a weekly weight-related goal in the weeklyWeightGoal
to add calories to the total daily expenditure.
Check this documentation to see the valid values to define for the weeklyWeightGoal
Example:
You will have the following macros:
currentWeight
: 80kgtargetWeight
: 60kgweeklyWeightGoal
:GOAL_1
(lose 0.5 kg)
This means that the user's goal is to lose 0.5 kg per week until the target weight is reached.
Define your macros goals to gain weight
If the goal is to gain weight, your targetWeight
have to be greater than the currentWeight
.
Check the following equation:
Then, define the rate to lose weight by choosing a weekly weight-related goal in the weeklyWeightGoal
to add calories to the total daily expenditure.
Check this documentation to see the valid values to define for the weeklyWeightGoal
Example:
You will have the following macros:
currentWeight
: 60kgtargetWeight
: 80kgweeklyWeightGoal
:GOAL_1
(gain 0.5 kg)
This means that the user's goal is to gain 0.5 kg per week until the target weight is reached.
Available Arguments
Argument
is Required?
Type
Description
activityLevel
Yes
ActivityLevel
User's weekly activity level. Valid values are
- NOT_ACTIVE
,
- EXERCISE_1
(1 - 2 times per week)
- EXERCISE_2
(3+ times per week)
Use this to calculate your caloric daily requirement
biologicalSex
Yes
BiologicalSex
The biological sex of the user. Valid values are MALE
and FEMALE
Use this to calculate your caloric daily requirement
birthdate
Yes
Date
User's birthday. Use this to calculate your caloric daily requirement
goalsOn
Yes
Boolean
True if the goals functionality is enabled. Requires all other parameters to be set.
height
Yes
Float
The height of the user. Use this to calculate your caloric daily requirement . Expressed in centimeters
startingWeight
Yes
Float
The user's current weight. Use this to calculate your caloric daily requirement. Expressed in kilograms.
targetWeight
Yes
Float
The user's target weight. Use this to calculate your caloric daily requirement. Expressed in kilograms.
weeklyWeightGoal
Yes
WeeklyWeightGoal
User weekly weight-related goal. Depending on the user's goals, use this to gain, lose or maintain weight. Valid values are:
MANTAIN:
maintain the weight,
GOAL_1:
lose/gain 0.5 kg,
GOAL_2:
lose/gain (1 kg),
GOAL_3:
lose/gain (1.5 kg),
GOAL_4:
lose/gain (4 kg)
Use this to calculate your caloric daily requirement
Available Fields
The following field will be part of the response.
Field Name
Type
Description
success
Boolean
True if the user weight-related goals has been set successfully. Otherwise, False
The following fields are the result of the macro goals calculation:
Field Name
Type
Description
dcig
Int
Daily Caloric Intake Goal
Int
Caloric Difference between the daily caloric intake goal and the totaly daily energy expenditure
Example
Execute the myProfile
query to check these goals configured.
PHP Example
Last updated