Save Ai Food Log

Use the saveAiFoodLog mutation to save a food analysis result generated by the processAiFood mutation as a food log entry.

AI Food Log entries can be retrieved using the expressMealTracks query.

Arguments

Argument
Type
Description

input

ProcessAIFoodInput

input.datetime

DateTime

The date when the food will be logged. Use the format: YYYY-MM-DDT hh:mm:ssZ

input.mealtime

MealTime!

Meal time to assign. enum MealTime { BREAKFAST LUNCH DINNER SNACK }

input.id

ID!

Id of the processed food.

Available Fields

success

Boolean

True if the food log has been saved. Otherwise, it displays False.

message

String

Description of the result.

Example

mutation{
  saveAiFoodLog(
    input:{
      datetime:"2025-05-23T17:07:21-07:00"
      mealTime:DINNER
      id:"Rm9vZEFuYWx5c2lzOmJlZjdiYTQ3LWM4NmYtNDE1NC04OGI1LTY2NTY4ZGQ2M2UxZQ=="
    }
  ){
    success
    message
  }
}

Last updated

Was this helpful?