Schema Documentation

menu

Description

A WordPress navigation menu

Response

Returns a Menu

Arguments
NameDescription
id - ID! The globally unique identifier of the menu.
idType - MenuNodeIdTypeEnum Type of unique identifier to fetch a menu by. Default is Global ID

Example

Query
query menu(
  $id: ID!,
  $idType: MenuNodeIdTypeEnum
){
  menu(
    id: $id,
    idType: $idType
  ){
    countdatabaseIdidisRestrictedlocationsmenuIdmenuItems {
      ...MenuToMenuItemConnectionFragment
    }nameslug
  }
}
Variables
{"id":"4","idType":"DATABASE_ID"}
Response
{"data":{"menu":{"count":987,"databaseId":123,"id":4,"isRestricted":false,"locations":["FOOTER"],"menuId":123,"menuItems":MenuToMenuItemConnection,"name":"abc123","slug":"abc123"}}}