deleteMenu
Requires permission settings:appearance:delete.
Deletes a menu, which hides it rather than erasing it. A menu that still has active submenus cannot be deleted. Needs the appearance settings delete permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation DeleteMenu($id: ID!) {
deleteMenu(id: $id)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation DeleteMenu($id: ID!) {\n deleteMenu(id: $id)\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"deleteMenu": true
}
}
deleteMenu(
id: ID!
): Boolean!
Arguments
deleteMenu.id ● ID! non-null scalar
The ID of the menu.
Type
Boolean scalar
The Boolean scalar type represents true or false.