Use the myCommonFoodsto return the user's stored common foods. These common foods are the ones created by a user by using the createMyCommonFoodsarrow-up-right mutation.
myCommonFoods
createMyCommonFoods
Use also an optional ID argument to search b64id foods.
ID
Name
Type
Description
Id
String
Unique Food ID. No required argument.
The following fields are part of the response.
Field Name
name
Name of the common food
description
Branded food description
portions
portionsarrow-up-right
Represents the predefined portions per food.
nutrients
nutrientsarrow-up-right
Object that includes the information of the nutrients available in the food
The myCommonFoods query supports the use of paginationarrow-up-right. The following fields can be used
pageInfo{ hasNextPage hasPreviousPage startCursor endCursor }
Last updated 3 years ago
Was this helpful?
{ myCommonFoods { edges { node { id name nutrients{ name type unit amount } } } } }
{ "data": { "myCommonFoods": { "edges": [ { "node": { "id": "TXlDb21tb25Gb29kOmUxTUZUWHdCRnhuZkRtOFZZMDRi", "name": "CALIFORNIA CHILE BLEND", "nutrients": [ { "name": "Protein", "type": "PROTEIN", "unit": "G", "amount": 0.038 }, { "name": "Retinol", "type": "RETINOL", "unit": "G", "amount": 0.34 } ] } }, { "node": { "id": "TXlDb21tb25Gb29kOkFsTU1UWHdCRnhuZkRtOFZCa19Y", "name": "Crispy cake wih cinammon", "nutrients": [ { "name": "Sugars, added", "type": "SUGARS_ADDED", "unit": "G", "amount": 0.01 }, { "name": "Lactose", "type": "LACTOSE", "unit": "G", "amount": 0.34 } ] } } ] } } }