How To Get Home Page Using GraphQL in Magento 2.x

The following below Magento 2.x GraphQL Query

{
  storeConfig {
    cms_home_page
  }
}

We can also get by using below cmsPage GraphQL query

Syntax

cmsPage(identifier: String): CmsPage
{
  cmsPage(identifier: "home") {
    title
    url_key
    content_heading
    content
    page_layout
    meta_title
    meta_keywords
    meta_description
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *