Schema Documentation

Menu

Description

Menus are the containers for navigation items. Menus can be assigned to menu locations, which are typically registered by the active theme.

Fields
Field NameDescription
count - Int The number of items in the menu
databaseId - Int! The unique identifier stored in the database
id - ID! The globally unique identifier of the nav menu object.
isRestricted - Boolean Whether the object is restricted from the current viewer
locations - [MenuLocationEnum] The locations a menu is assigned to
menuId - Int WP ID of the nav menu. Deprecated in favor of the databaseId field
menuItems - MenuToMenuItemConnection Connection between the Menu type and the MenuItem type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - MenuToMenuItemConnectionWhereArgs

Arguments for filtering the connection

name - String Display name of the menu. Equivalent to WP_Term->name.
slug - String The url friendly name of the menu. Equivalent to WP_Term->slug
Example
{"count":987,"databaseId":123,"id":4,"isRestricted":false,"locations":["FOOTER"],"menuId":987,"menuItems":MenuToMenuItemConnection,"name":"xyz789","slug":"abc123"}