Delete a Food Log Entry

Use the deleteFoodLog mutation to delete the specified meal log.

The deleteFoodLog mutation has the same functionality as the removeMealLog, however, this does not delete the logs created with the createMealLogmutation.

Required Argument

Argument

Type

Description

Id

String

ID of the food to remove. Use the foodLogs query to get the databaseId

Available Fields

The following field will be part of the response.

Field name

Type

Description

sucess

String

True if the meal log has been deleted. Otherwise, it displays False

message

String

Description of the result

Example

GraphQL Example

mutation {
  deleteFoodLog (id: "QnJhbmRlZEZvb2ROb2RlOjQ3OTk0MQ==")
    {
      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 { deleteFoodLog(Id:\"QnJhbmRlZEZvb2ROb2RlOjQ3OTk0MQ==\") { success message } }"}'

Last updated