Skip to content

ServingSize

A serving size object

Fields

amount · Float · The number of servings
calories · Float · The calories of serving size
fdc_import · Boolean! · required · Whether or not this serving size was imported from the USDA database
food_id · String · The food id of the food this serving size belongs to
food_portion_id · ID · The id of the food portion this serving size belongs to
id · ID! · required · The unique identifier of the serving size
macro_nutrients · [FoodNutrient!] · The macro nutrients of this serving size (Calories, Carbohydrate, Protein, Fat)
modifier · Float · percentage of 100g. For example if modifier is 2.5 then this serving size is 250g
nutrients · [FoodNutrient!] · The nutrients of this serving size
unit · String · The type of serving (i.e grams, scoop, spoonful)

Used By

Definition

"""
A serving size object
"""
type ServingSize {
"""
The number of servings
"""
amount: Float
"""
The calories of serving size
"""
calories: Float
"""
Whether or not this serving size was imported from the USDA database
"""
fdc_import: Boolean!
"""
The food id of the food this serving size belongs to
"""
food_id: String
"""
The id of the food portion this serving size belongs to
"""
food_portion_id: ID
"""
The unique identifier of the serving size
"""
id: ID!
"""
The macro nutrients of this serving size (Calories, Carbohydrate, Protein, Fat)
"""
macro_nutrients: [FoodNutrient!]
"""
percentage of 100g. For example if modifier is 2.5 then this serving size is 250g
"""
modifier: Float
"""
The nutrients of this serving size
"""
nutrients(
"""
If true, only returns nutrients if food is created by user ()
"""
food_search: Boolean
): [FoodNutrient!]
"""
The type of serving (i.e grams, scoop, spoonful)
"""
unit: String
}