Delete a User Recipe

Use the deleteUserRecipe mutation to delete a specific recipe created by a user. Use a b64 id to delete the recipe. Note that only the owner of the recipe can delete it.

Required Argument

Argument

Type

Description

Id

String

Unique Id of the user's recipe. Get the information of all your recipes by executing the myRecipes query.

Available Fields

The following field will be part of the response.

Field name

Type

Description

success

Boolean

True if the user's recipe has been deleted. Otherwise, it displays False

message

String

Description of the result

Example

GraphQL Example

mutation deleteMyRecipe {
  deleteMyRecipe(id: "VXNlclJlY2lwZTphNXNKWVh3QlY0Q1V6aWdSNkhaeg==") {
    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 { deleteMyRecipe (id:\"VXNlclJlY2lwZTpCbFVKWVh3QkZ4bmZEbThWempFVA==\") { success message } }"}'

Last updated