Skip to main content
Version: 3.x

MenuItem

Represents a single item of the related menu. Can store categories, collection or pages.

type MenuItem implements Node, ObjectWithMetadata {
id: ID!
privateMetadata: [MetadataItem!]!
privateMetafield(key: String!): String
privateMetafields(keys: [String!]): Metadata
metadata: [MetadataItem!]!
metafield(key: String!): String
metafields(keys: [String!]): Metadata
name: String!
menu: Menu!
parent: MenuItem
category: Category
collection: Collection
page: Page
level: Int!
children: [MenuItem!]
url: String
translation(languageCode: LanguageCodeEnum!): MenuItemTranslation
}
Expand ▼

Fields

The ID of the menu item.

List of private metadata items. Requires staff permissions to access.

A single key from private metadata. Requires staff permissions to access.

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3

Private metadata. Requires staff permissions to access. Use keys to control which fields you want to include. The default is to include everything.

Added in Saleor 3.3

List of public metadata items. Can be accessed without permissions.

A single key from public metadata.

Tip: Use GraphQL aliases to fetch multiple keys.

Added in Saleor 3.3

Public metadata. Use keys to control which fields you want to include. The default is to include everything.

Added in Saleor 3.3

The name of the menu item.

Represents the menu to which the menu item belongs.

ID of parent menu item. If empty, menu will be top level menu.

Category associated with the menu item.

A collection associated with this menu item.

Requires one of the following permissions to include the unpublished items: MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS

A page associated with this menu item.

Requires MANAGE_PAGESpermission.

Indicates the position of the menu item within the menu structure.

Represents the child items of the current menu item.

URL to the menu item.

Returns translated menu item fields for the given language code.

A language code to return the translation for menu item.

Interfaces

Node interface

An object with an ID

ObjectWithMetadata interface

Returned by

menuItem query

Member of

Menu object ● MenuItem object ● MenuItemCountableEdge object ● MenuItemCreate object ● MenuItemCreated object ● MenuItemDelete object ● MenuItemDeleted object ● MenuItemTranslatableContent object ● MenuItemTranslate object ● MenuItemUpdate object ● MenuItemUpdated object


Was this page helpful?