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 miscellaneous
The ID of the menu item.
MenuItem.privateMetadata
● [MetadataItem!]!
non-null object miscellaneous
List of private metadata items. Requires staff permissions to access.
MenuItem.privateMetafield
● String
scalar miscellaneous
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 miscellaneous
MenuItem.privateMetafields
● Metadata
scalar miscellaneous
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 miscellaneous
MenuItem.metadata
● [MetadataItem!]!
non-null object miscellaneous
List of public metadata items. Can be accessed without permissions.
MenuItem.metafield
● String
scalar miscellaneous
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 miscellaneous
MenuItem.metafields
● Metadata
scalar miscellaneous
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 miscellaneous
MenuItem.name
● String!
non-null scalar miscellaneous
The name of the menu item.
MenuItem.menu
● Menu!
non-null object menu
Represents the menu to which the menu item belongs.
MenuItem.parent
● MenuItem
object menu
ID of parent menu item. If empty, menu will be top level menu.
MenuItem.category
● Category
object products
Category associated with the menu item.
MenuItem.collection
● Collection
object products
A collection associated with this menu item.
MenuItem.page
● Page
object pages
A page associated with this menu item.
MenuItem.level
● Int!
non-null scalar miscellaneous
Indicates the position of the menu item within the menu structure.
MenuItem.children
● [MenuItem!]
list object menu
Represents the child items of the current menu item.
MenuItem.url
● String
scalar miscellaneous
URL to the menu item.
MenuItem.translation
● MenuItemTranslation
object menu
Returns translated menu item fields for the given language code.
MenuItem.translation.languageCode
●LanguageCodeEnum!
non-null enum miscellaneousA language code to return the translation for menu item.
Interfaces
Node
interface miscellaneous
An object with an ID
ObjectWithMetadata
interface miscellaneous
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