Schema Documentation
menu
Description
A WordPress navigation menu
Response
Returns a Menu
Arguments
Name | Description |
---|---|
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":987,"menuItems":MenuToMenuItemConnection,"name":"xyz789","slug":"xyz789"}}}