Menu
Requires access scope.
Navigation menus that organize links into logical structures to guide customers through a store. Menus serve as the backbone of store navigation, making it easy for customers to find products, pages, and other content through organized hierarchical links.
For example, a merchant might create a main navigation menu with top-level categories like "Products," "About Us," and "Contact," where each category can contain nested menu items linking to specific collections, pages, or external resources.
Use the Menu object to:
- Build and customize store navigation structures
- Organize hierarchical menu systems with nested items
- Work with default menus that can't be deleted
- Access menu items for building navigation
Menus can be designated as default navigation elements (like main menu or footer), which can't be deleted and have restricted handle updates. The handle provides a unique identifier that themes can reference, while the items collection enables nested navigation structures.
Each menu contains menu items that can link to various resource types. This flexibility lets merchants create navigation experiences that guide customers through their store.
Anchor to FieldsFields
- Anchor to handlehandle•String!non-null
The menu's handle.
- •ID!non-null
A globally-unique ID.
- Anchor to isDefaultis•Boolean!
Default non-null Whether the menu is a default. The handle for default menus can't be updated and default menus can't be deleted.
- Anchor to itemsitems•[Menu
Item!]! non-null A list of items on the menu sorted by position.
- Anchor to limitlimit•Int
The number of menu items to be returned.
Arguments
- Anchor to titletitle•String!non-null
The menu's title.
- Anchor to translationstranslations•[Translation!]!non-null
The published translations associated with the resource.
- Anchor to localelocale•String!required
Filters translations locale.
- Anchor to marketIdmarket•ID
Id Filters translations by market ID. Use this argument to retrieve content specific to a market.
Arguments
Anchor to QueriesQueries
- •query
Returns a
Menuresource by ID.- •ID!required
The ID of the
Menuto return.
Arguments
- •ID!
- •query
Retrieves navigation menus. Menus organize content into hierarchical navigation structures that merchants can display in the online store (for example, in headers, footers, and sidebars) and customer accounts.
Each
Menucontains a handle for identification, a title for display, and a collection ofobjects that can be nested up to 3 levels deep. Default menus have protected handles that can't be modified.- •Int
The first
nelements from the paginated list.- •Int
The last
nelements from the paginated list.- •BooleanDefault:false
Reverse the order of the underlying list.
- •Menu
Sort Keys Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
- •String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
Arguments
Anchor to MutationsMutations
- •mutation
Creates a navigation
Menufor the online store. Menus organize links that help customers navigate to collections, products, pages, blogs, and custom URLs.Each menu requires a unique handle for identification and can contain multiple
objects with nested sub-items up to three levels deep.- •String!required
The menu's title.
- •String!required
The menu's handle.
- •[Menu
Item Create Input!]! required List of the menu's items.
Arguments
- •String!
- •mutation
Updates a
Menufor display on the storefront. Modifies the menu's title and navigation structure, including nestedobjects. You can update the handle for non-default menus.The items argument accepts a list of menu items with their nested structure. Each item can include nested items to create multi-level navigation hierarchies. Default menus have restricted updates—you can't change their handles.
- •ID!required
ID of the menu to be updated.
- •String!required
The menu's title.
- •String
The menu's handle.
- •[Menu
Item Update Input!]! required List of the menu's items.
Arguments
- •ID!