menu
query
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
Return
Menu id
Menu item
Number of menu items
Title of menu
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
menu query
Code
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"
},
{
"url": "/collections",
"id": "gid://shopline/MenuItem/3",
"title": "All products",
"type": "CATALOG"
}
],
"itemsCounts": 3,
"title": "Main menu"
}
},
"extensions": {
"metrics": {
"dataFetcherMetrics": [
{
"dfProtocol": "dubbo",
"dfRootCoordinate": "/menu",
"dfRt": 20,
"dfServiceIdentity": "com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi@menuQuery",
"dfStartTime": 1730357374905,
"dfErrorCode": null
}
],
"graphQLMetrics": {
"namespace": "storefront",
"countryCode": null,
"ratelimitRemaining": 1,
"rt": 27,
"startParseTimeMillis": 1730357374901,
"includeQuery": false,
"parseRt": 0,
"successType": "SUCCESS",
"appKey": "ac46139a45013c6d13b3bdb53ba7b12b2af6d35f",
"customizedClientIp": "183.90.187.195",
"includeDeprecatedField": false,
"operation": "QUERY",
"startTimeMillis": 1730357374900,
"storeId": "1671771213310",
"storePlus": false,
"deepLevel": 3,
"executionId": "dc584302-1808-4ea6-9045-4829e0f92a96",
"loaderCount": 0,
"merchantId": "4200333804",
"saleChannel": null,
"traceId": "34dfaffc2770b5fa23bd4f8ccb49a63f",
"appId": "264149",
"clientIp": "183.90.187.195",
"endParseTimeMillis": 1730357374901,
"errorFieldsCount": 0,
"fieldCount": 29,
"languageCode": null,
"version": "v20250301",
"tenant": "ec20",
"ratelimitPermits": 1
}
},
"tracing": {
"parsing": {
"duration": 301196,
"startOffset": 362419
},
"startTime": "2024-10-31T06:49:34.900Z",
"validation": {
"duration": 710641,
"startOffset": 1275959
},
"version": 1,
"duration": 26631305,
"endTime": "2024-10-31T06:49:34.927Z",
"execution": {
"resolvers": [
{
"parentType": "Query",
"path": [
"menu"
],
"returnType": "Menu",
"startOffset": 4085230,
"duration": 21336423,
"fieldName": "menu"
},
{
"startOffset": 25560012,
"duration": 21010,
"fieldName": "id",
"parentType": "Menu",
"path": [
"menu",
"id"
],
"returnType": "ID!"
},
{
"fieldName": "title",
"parentType": "Menu",
"path": [
"menu",
"title"
],
"returnType": "String",
"startOffset": 25630623,
"duration": 11285
},
{
"duration": 9375,
"fieldName": "itemsCounts",
"parentType": "Menu",
"path": [
"menu",
"itemsCounts"
],
"returnType": "Int",
"startOffset": 25678671
},
{
"parentType": "Menu",
"path": [
"menu",
"items"
],
"returnType": "[MenuItem]",
"startOffset": 25788542,
"duration": 10261,
"fieldName": "items"
},
{
"parentType": "MenuItem",
"path": [
"menu",
"items",
0,
"id"
],
"returnType": "ID",
"startOffset": 25923632,
"duration": 10768,
"fieldName": "id"
},
{
"path": [
"menu",
"items",
0,
"title"
],
"returnType": "String",
"startOffset": 25969897,
"duration": 9579,
"fieldName": "title",
"parentType": "MenuItem"
},
{
"fieldName": "type",
"parentType": "MenuItem",
"path": [
"menu",
"items",
0,
"type"
],
"returnType": "MenuItemType",
"startOffset": 26014042,
"duration": 9246
},
{
"startOffset": 26063780,
"duration": 8934,
"fieldName": "url",
"parentType": "MenuItem",
"path": [
"menu",
"items",
0,
"url"
],
"returnType": "URL"
},
{
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"id"
],
"returnType": "ID",
"startOffset": 26159635,
"duration": 9456,
"fieldName": "id"
},
{
"duration": 9343,
"fieldName": "title",
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"title"
],
"returnType": "String",
"startOffset": 26202232
},
{
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"type"
],
"returnType": "MenuItemType",
"startOffset": 26243891,
"duration": 9177,
"fieldName": "type"
},
{
"duration": 8875,
"fieldName": "url",
"parentType": "MenuItem",
"path": [
"menu",
"items",
1,
"url"
],
"returnType": "URL",
"startOffset": 26287148
},
{
"startOffset": 26364253,
"duration": 9928,
"fieldName": "id",
"parentType": "MenuItem",
"path": [
"menu",
"items",
2,
"id"
],
"returnType": "ID"
},
{
"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
},
{
"startOffset": 26499069,
"duration": 9327,
"fieldName": "url",
"parentType": "MenuItem",
"path": [
"menu",
"items",
2,
"url"
],
"returnType": "URL"
}
]
}
},
"dataloader": {
"overall-statistics": {
"cacheHitRatio": 0,
"loadCount": 0,
"cacheHitCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0
},
"individual-statistics": {
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-images": {
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-options": {
"batchInvokeCount": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-publishedAtForLoader": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadRatio": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-template": {
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variants": {
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"loadErrorRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-variantsForLoader": {
"batchLoadCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"loadCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
},
"LD-com.shopline.merchant.website.openapi.interfaces.OnlineStorefrontApi-commentsQuery": {
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadCount": 0,
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-onlineStoreUrl": {
"loadCount": 0,
"loadErrorCount": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorRatio": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.CollectionStorefrontQueryService-queryCollectionByProduct": {
"batchInvokeCount": 0,
"batchLoadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitCount": 0,
"cacheHitRatio": 0,
"loadErrorRatio": 0,
"loadCount": 0,
"loadErrorCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.DescriptionQueryService-query": {
"loadErrorCount": 0,
"loadErrorRatio": 0,
"batchLoadCount": 0,
"cacheHitCount": 0,
"batchInvokeCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadCount": 0
},
"LD-com.shopline.pixiu.pcq.storefront.api.ProductStorefrontQueryV2Service-onlineStoreUrl": {
"loadErrorRatio": 0,
"batchInvokeCount": 0,
"batchLoadCount": 0,
"cacheHitCount": 0,
"loadCount": 0,
"batchLoadExceptionCount": 0,
"batchLoadExceptionRatio": 0,
"batchLoadRatio": 0,
"cacheHitRatio": 0,
"loadErrorCount": 0
}
}
}
}
}
Was this article helpful to you?