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:
targetWeight<startingWeight
Then, define the rate to lose weight by choosing a weekly weight-related goal in the weeklyWeightGoalto 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: 80kg
targetWeight: 60kg
weeklyWeightGoal: 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:
targetWeight>startingWeight
Then, define the rate to lose weight by choosing a weekly weight-related goal in the weeklyWeightGoalto 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: 60kg
targetWeight: 80kg
weeklyWeightGoal: 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
Available Fields
The following field will be part of the response.
The following fields are the result of the macro goals calculation:
Execute the myProfile query to check these goals configured.
{ myProfile { id age birthdate biologicalSex activityLevel startingWeight customAttributes targetWeight height weeklyWeightGoal goalsOn programName language subscription{ id createdAt name } restrictions { name } dailyCaloricIntakeGoal caloricDifference totalDailyEnergyExpenditure basalMetabolicRate program { databaseId, name author } }}