An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Certified by menu query
Arguments
handle ● String
menu handle
id ● ID
Menu ID (if both ID and Handle are passed in, menu information will be queried based on ID, ignoring Handle)
Returns
id ● ID!non-null
Menu id
items ● [MenuItem]
Menu item
itemsCounts ● Int
Number of menu items
title ● String
Title of menu
Error Code
For more information about common error codes, refer to Status and error codes.
Example
menu query
query {
menu(id:"gid://shopline/Menu/5728759581775504415") {
id
title
itemsCounts
items {
id
title
type
url
}
}
}
Response
{
"data": {
"menu": {
"id": "gid://shopline/Menu/5728759581775504415",
"items": [
{
"id": "gid://shopline/MenuItem/1",
"title": "Home",
"type": "FRONTPAGE",
"url": "/home"
},
{
"id": "gid://shopline/MenuItem/2",
"title": "Collections",
"type": "COLLECTIONS",
"url": "/collections-all"
},
{
"id": "gid://shopline/MenuItem/3",
"title": "All products",
"type": "CATALOG",
"url": "/collections"
}
],
"itemsCounts": 3,
"title": "Main menu"
}
},
"extensions": {
"dataloader": {
"individual-statistics": {
"LD-com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi-commentsQuery": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-onlineStoreUrl": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-queryCollectionByProduct": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.DescriptionQueryService-query": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-images": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-onlineStoreUrl": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-options": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-publishedAtForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-template": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variants": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variantsForLoader": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
}
},
"overall-statistics": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0
}
},
"metrics": {
"dataFetcherMetrics": [
{
"dfErrorCode": null,
"dfProtocol": "dubbo",
"dfRootCoordinate": "/menu",
"dfRt": 20,
"dfServiceIdentity": "com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi@menuQuery",
"dfStartTime": 1730357374905
}
],
"graphQLMetrics": {
"appId": "264149",
"appKey": "ac46139a45013c6d13b3bdb53ba7b12b2af6d35f",
"clientIp": "183.90.187.195",
"countryCode": null,
"customizedClientIp": "183.90.187.195",
"deepLevel": 3,
"endParseTimeMillis": 1730357374901,
"errorFieldsCount": 0,
"executionId": "dc584302-1808-4ea6-9045-4829e0f92a96",
"fieldCount": 29,
"includeDeprecatedField": false,
"includeQuery": false,
"languageCode": null,
"loaderCount": 0,
"merchantId": "4200333804",
"namespace": "storefront",
"operation": "QUERY",
"parseRt": 0,
"ratelimitPermits": 1,
"ratelimitRemaining": 1,
"rt": 27,
"saleChannel": null,
"startParseTimeMillis": 1730357374901,
"startTimeMillis": 1730357374900,
"storeId": "1671771213310",
"storePlus": false,
"successType": "SUCCESS",
"tenant": "ec20",
"traceId": "34dfaffc2770b5fa23bd4f8ccb49a63f",
"version": "v20250301"
}
},
"tracing": {
"duration": 26631305,
"endTime": "2024-10-31T06:49:34.927Z",
"execution": {
"resolvers": [
{
"duration": 21336423,
"fieldName": "menu",
"parentType": "Query",
"path": [
"menu"
],
"returnType": "Menu",
"startOffset": 4085230
},
{
"duration": 21010,
"fieldName": "id",
"parentType": "Menu",
"path": [
"menu",
"id"
],
"returnType": "ID!",
"startOffset": 25560012
},
{
"duration": 11285,
"fieldName": "title",
"parentType": "Menu",
"path": [
"menu",
"title"
],
"returnType": "String",
"startOffset": 25630623
},
{
"duration": 9375,
"fieldName": "itemsCounts",
"parentType": "Menu",
"path": [
"menu",
"itemsCounts"
],
"returnType": "Int",
"startOffset": 25678671
},
{
"duration": 10261,
"fieldName": "items",
"parentType": "Menu",
"path": [
"menu",
"items"
],
"returnType": "[MenuItem]",
"startOffset": 25788542
},
{
"duration": 10768,
"fieldName": "id",
"parentType": "MenuItem",
"path": [
"menu",
"items",
0,
"id"
],
"returnType": "ID",
"startOffset": 25923632
},
{
"duration": 9579,
"fieldName": "title",
"parentType": "MenuItem",
"path": [
"menu",
"items",
0,
"title"
],
"returnType": "String",
"startOffset": 25969897
},
{
"duration": 9246,
"fieldName": "type",
"parentType": "MenuItem",
"path": [
"menu",
"items",
0,
"type"
],
"returnType": "MenuItemType",
"startOffset": 26014042
},
{
"duration": 8934,
"fieldName": "url",
"parentType": "MenuItem",
"path": [
"menu",
"items",
0,
"url"
],
"returnType": "URL",
"startOffset": 26063780
},
{
"duration": 9456,
"fieldName": "id",
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"id"
],
"returnType": "ID",
"startOffset": 26159635
},
{
"duration": 9343,
"fieldName": "title",
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"title"
],
"returnType": "String",
"startOffset": 26202232
},
{
"duration": 9177,
"fieldName": "type",
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"type"
],
"returnType": "MenuItemType",
"startOffset": 26243891
},
{
"duration": 8875,
"fieldName": "url",
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"url"
],
"returnType": "URL",
"startOffset": 26287148
},
{
"duration": 9928,
"fieldName": "id",
"parentType": "MenuItem",
"path": [
"menu",
"items",
2,
"id"
],
"returnType": "ID",
"startOffset": 26364253
},
{
"duration": 9020,
"fieldName": "title",
"parentType": "MenuItem",
"path": [
"menu",
"items",
2,
"title"
],
"returnType": "String",
"startOffset": 26407189
},
{
"duration": 9311,
"fieldName": "type",
"parentType": "MenuItem",
"path": [
"menu",
"items",
2,
"type"
],
"returnType": "MenuItemType",
"startOffset": 26448696
},
{
"duration": 9327,
"fieldName": "url",
"parentType": "MenuItem",
"path": [
"menu",
"items",
2,
"url"
],
"returnType": "URL",
"startOffset": 26499069
}
]
},
"parsing": {
"duration": 301196,
"startOffset": 362419
},
"startTime": "2024-10-31T06:49:34.900Z",
"validation": {
"duration": 710641,
"startOffset": 1275959
},
"version": 1
}
}
}
Was this article helpful to you?