Create a Meal Tracker Entry
Meal Tracking is a simplified version of food logging that only works for meal plan meals.
Use the createMealEntry
mutation to add a meal entry for a specific meal. These created meal entries can be tracked by using the mealTracker
query.
Meal entries can have an assigned value. For instance, if you want to skip a meal, you can send the value: SKIPPED
as a parameter. Below you will find all the possible values a meal entry can have.
Note: Currently tracking service only supports JWT authentication
Required Arguments
Field
Type
Note
value
String
Value of the meal. Possible values:
SKIPPED
, ATE
, OTHER_FOLLOWING
, OTHER_NOT_FOLLOWING
, and DELETE
Available Fields
The following fields will be displayed in the response:
Field
Type
Note
success
Boolean
True if a meal entry has been created. Otherwise, it displays False
message
String
Description of the result
Examples
The following examples will create a skipped meal entry
GraphQL Example
mutation
{ createMealEntry(mealId:"TWVhbDoxMzUyMzE0" value: SKIPPED)
{
success
message
}
}
curl Example
curl -XPOST 'https://production.suggestic.com/graphql' \
-H 'Authorization: Bearer <User-JWT>' \
-H 'Content-Type: application/json' \
--data-raw '{"query":"mutation { createMealEntry(mealId:\"TWVhbDoxMzUyMzE0\", value: SKIPPED) { success message } }"}'
Last updated
Was this helpful?