How to get response for the FRONTPAGE and CATALOG with Shopify GraphQL API?

27 Views Asked by At

I am using the menu query to get the main-menu with Shopify GraphQL API.

It returns me menu items and all of that looks good.

It contains a menu item of type FRONTPAGE which is the client's Home page.

How I can make a query to get the response of the content for that FRONTPAGE/Home page?

There is also menu type of the CATALOG. How I can make the request to get response for that?

Here is my response for the menu query:

{
    "data": {
        "menu": {
            "id": "gid://shopify/Menu/888734372",
            "title": "Main menu",
            "itemsCount": 4,
            "items": [
                {
                    "id": "gid://shopify/MenuItem/62623462",
                    "title": "Home",
                    "type": "FRONTPAGE",
                    "url": "https:/test.myshopify.com/",
                    "resourceId": null
                },
                {
                    "id": "gid://shopify/MenuItem/251532",
                    "title": "Electronics",
                    "type": "COLLECTION",
                    "url": "https://test.myshopify.com/collections/catalog",
                    "resourceId": "gid://shopify/Collection/26262"
                },
                {
                    "id": "gid://shopify/MenuItem/888888",
                    "title": "Clothing & Accessories",
                    "type": "CATALOG",
                    "url": "https://test.myshopify.com/collections/all",
                    "resourceId": null
                }, 
                {
                    "id": "gid://shopify/MenuItem/111111",
                    "title": "About",
                    "type": "PAGE",
                    "url": "https:/test.myshopify.com/pages/about",
                    "resourceId": "gid://shopify/Page/111111"
                }
            ]
        }
    }
}
0

There are 0 best solutions below