Create Log Entry
Create a new meal log entry
Last updated
Was this helpful?
Create a new meal log entry
Last updated
Was this helpful?
Use the createMealLog
mutation to create a new log entry for the logged-in user. This service is commonly used together with the search.
Please note that depending on the mealType being logged a different combination of parameters will be required. Please review ourbefore starting.
Argument
Required?
Type
Description
mealDatabaseId
True
String!
The databaseId
of the meal being logged.
mealType
True
Available options are RECIPE
, MENU_ITEM
, OWN_RECIPE
, USDA_MEAL
, and OWN_ITEM
mealTime
True
MealTime!
Available options are BREAKFAST
, SNACK
, LUNCH
and DINNER
quantity
True
Float
The number of servings that is being logged
serving
False
Float!
Don't use this field if you are using thecustomServingEquivalent
option.
customServingEquivalent
False
Float
If not using the serving
field, then enter here the equivalent in grams that is being logged.
I.e. If a protein bar weighs 100 grams (1 serving) and you want to log 0.8 servings, then this value would be 80.
date
False
Date!
format YYYY-mm-dd
time
False
Time!
format HH:MM
Creating a new log entry for a recipe that was consumed for dinner on a particular date and time.
I.e. If you are logging a recipe, then mealType
should be RECIPE and mealDatabaseId
should be the databaseId
of the .
Represents the index of the item in the object that is being logged.