Issue with Fetching Main Menu with Nested Collections using Shopify Admin API

Subject: Issue with Fetching Main Menu with Nested Collections using Shopify Admin API

Dear Shopify Support Team,

I’m reaching out to report an issue we’re facing while developing a Shopify embedded app. Our app requires fetching the main menu with nested collections and resources, but we’re encountering an error. The error message indicates that the Shopify Admin API doesn’t have access to the main menu.

Here’s the GraphQL query we’re using:


menu(handle: “main-menu”) {
title
items {
title
type
url
resource {
… on Collection {
id
title
handle
products(first: 100) {
edges {
node {
id
title
handle
descriptionHtml
productType
tags
featuredImage {
url
altText
}
priceRange {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
media(first: 50) {
edges {
node {
__typename
… on MediaImage {
image {
url
altText
}
}
… on Video {
sources {
url
mimeType
}
previewImage {
url
}
}
}
}
}
collections(first: 50) {
edges {
node {
id
title
handle
}
}
}
variants(first: 50) {
edges {
node {
id
title
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
availableForSale
sku
weight
weightUnit
barcode
image {
url
altText
}
selectedOptions {
name
value
}
}
}
}
}
}
}
}
}
items {
title
type
url
resource {
… on Collection {
id
title
handle
products(first: 100) {
edges {
node {
id
title
handle
descriptionHtml
productType
tags
featuredImage {
url
altText
}
priceRange {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
media(first: 50) {
edges {
node {
__typename
… on MediaImage {
image {
url
altText
}
}
… on Video {
sources {
url
mimeType
}
previewImage {
url
}
}
}
}
}
collections(first: 50) {
edges {
node {
id
title
handle
}
}
}
variants(first: 50) {
edges {
node {
id
title
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
availableForSale
sku
weight
weightUnit
barcode
image {
url
altText
}
selectedOptions {
name
value
}
}
}
}
}
}
}
}
}
items {
title
type
url
resource {
… on Collection {
id
title
handle
products(first: 100) {
edges {
node {
id
title
handle
descriptionHtml
productType
tags
featuredImage {
url
altText
}
priceRange {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
media(first: 50) {
edges {
node {
__typename
… on MediaImage {
image {
url
altText
}
}
… on Video {
sources {
url
mimeType
}
previewImage {
url
}
}
}
}
}
collections(first: 50) {
edges {
node {
id
title
handle
}
}
}
variants(first: 50) {
edges {
node {
id
title
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
availableForSale
sku
weight
weightUnit
barcode
image {
url
altText
}
selectedOptions {
name
value
}
}
}
}
}
}
}
}
}
}
}
}
}

Our app is designed to be installed by merchants on their Shopify stores, and fetching the main menu is a crucial feature for our app’s functionality. We’ve reviewed the Shopify API documentation and couldn’t find any information on accessing main menus.

Could you please assist us in resolving this issue? We’d appreciate guidance on:

  1. Whether the Shopify Admin API supports fetching main menus with nested collections and resources.
  2. If supported, what permissions or scopes are required to access the main menu.

Thank you for your prompt attention to this matter. We look forward to hearing from you soon.

Best regards,

Hi @David_Chassen

The Admin API does not expose navigation menus or their structure. There is no menu or navigationMenu query in the Admin API, so this is why you can’t fetch the main menu, its items, or their nested resources (collections, products, etc.).

If you need to fetch menus, you’d need to use the Storefront API, not the Admin API.