younifyd
Menu

menu

Retrieves a Menu by its handle. Menus are hierarchical navigation structures that merchants configure for their storefront, such as header and footer navigation.

Use it in a workflow

  1. Add a step and choose the Shopify Storefront connector.
  2. Pick the menu action (under Menu).
  3. Fill in the fields below, then reference the result from later steps as {{menu.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query Menu($handle: String!) {
  menu(handle: $handle) {
    handle
    id
    items {
      id
      items
      resource
      resourceId
      tags
      title
      type
      url
    }
    itemsCount
    title
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

handlestringrequired

The navigation menu's handle.

json
{
  "handle": "string"
}

Response

Read the result with {{menu.response.data.data.menu}}. If the API returns errors, the step fails and they are at {{menu.response.data.errors}}.

handlestring
idstring
itemsarray<object>
idobject
itemsobject
resourceobject
resourceIdobject
tagsobject
titleobject
typeobject
urlobject
itemsCountnumber
titlestring

Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.

Was this page helpful?