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 |
| Yes | ActivityLevel | User's weekly activity level. Valid values are - - - |
| Yes | BiologicalSex | The biological sex of the user. Valid values are |
| Yes | Date | User's birthday. Use this to calculate your caloric daily requirement |
| Yes | Boolean | True if the goals functionality is enabled. Requires all other parameters to be set. |
| Yes | Float | The height of the user. Use this to calculate your caloric daily requirement . Expressed in centimeters |
| Yes | Float | The user's current weight. Use this to calculate your caloric daily requirement. Expressed in kilograms. |
| Yes | Float | The user's target weight. Use this to calculate your caloric daily requirement. Expressed in kilograms. |
| Yes | WeeklyWeightGoal | User weekly weight-related goal. Depending on the user's goals, use this to gain, lose or maintain weight. Valid values are:
|
Available Fields
The following field will be part of the response.
Field Name | Type | Description |
| 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 |
| Int | Daily Caloric Intake Goal |
Int | Caloric Difference between the daily caloric intake goal and the totaly daily energy expenditure | |
Int | Total Daily Energy Expenditure | |
Int | Basal Metabolic Rate calculated with the Harris–Benedict equation. | |
Int | Body Mass Index calculated from user's weight and height values. |
Example
Execute the myProfile
query to check these goals configured.
PHP Example
Last updated