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
}
Fields
MenuItem.id
● ID!
non-null scalar
The ID of the menu item.
MenuItem.privateMetadata
● [MetadataItem!]!
non-null object
List of private metadata items. Requires staff permissions to access.
MenuItem.privateMetafield
● String
scalar
A single key from private metadata. Requires staff permissions to access.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
MenuItem.privateMetafield.key
●String!
non-null scalar
MenuItem.privateMetafields
● Metadata
scalar
Private metadata. Requires staff permissions to access. Use
Added in Saleor 3.3keys
to control which fields you want to include. The default is to include everything.
MenuItem.privateMetafields.keys
●[String!]
list scalar
MenuItem.metadata
● [MetadataItem!]!
non-null object
List of public metadata items. Can be accessed without permissions.
MenuItem.metafield
● String
scalar
A single key from public metadata.
Tip: Use GraphQL aliases to fetch multiple keys.
Added in Saleor 3.3
MenuItem.metafield.key
●String!
non-null scalar
MenuItem.metafields
● Metadata
scalar
Public metadata. Use
Added in Saleor 3.3keys
to control which fields you want to include. The default is to include everything.
MenuItem.metafields.keys
●[String!]
list scalar
MenuItem.name
● String!
non-null scalar
The name of the menu item.
MenuItem.menu
● Menu!
non-null object
Represents the menu to which the menu item belongs.
MenuItem.parent
● MenuItem
object
ID of parent menu item. If empty, menu will be top level menu.
MenuItem.category
● Category
object
Category associated with the menu item.
MenuItem.collection
● Collection
object
A collection associated with this menu item.
MenuItem.page
● Page
object
A page associated with this menu item.
MenuItem.level
● Int!
non-null scalar
Indicates the position of the menu item within the menu structure.
MenuItem.children
● [MenuItem!]
list object
Represents the child items of the current menu item.
MenuItem.url
● String
scalar
URL to the menu item.
MenuItem.translation
● MenuItemTranslation
object
Returns translated menu item fields for the given language code.
MenuItem.translation.languageCode
●LanguageCodeEnum!
non-null enumA 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