For the complete documentation index, see llms.txt. This page is also available as Markdown.

Macros Aggregation

A list of aggregated macronutrient sums for the given date ranges

The mealLogMacroAggs query returns a list of aggregated macronutrients for the given date ranges, not grouped by date. I.e. the sum of carbs in grams consumed in the past 5 days.

Required Arguments

Argument

Type

Required

fromDate

Date!

true

toDate

Date!

true

Available Fields

Nutrient

Description

Unit

chocdf (carbs)

Carbs

g

fat

Fat

g

procnt (protein)

Protein

g

sugar

Sugar

g

netcarbs

Net Carbs

g

calories

Calories

cal

Example

{
  mealLogMacroAggs(fromDate: "2020-01-01" toDate: "2020-01-21") {
    sugar
    fat
    procnt
    chocdf
    calories
  }
}
{
  "data": {
    "mealLogMacroAggs": {
      "sugar": 30.53749942779541,
      "fat": 62.32470226287842,
      "procnt": 65.92470264434814,
      "chocdf": 86.83156776428223,
      "calories": 600
    }
  }
}

Last updated

Was this helpful?