Skip to main content

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:

mutation DeleteMenu($id: ID!) {
deleteMenu(id: $id)
}

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.