mageworx/module-htmlsitemap-graph-ql

N/A

Installs: 28 311

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 0

Open Issues: 0

Type:magento2-module

1.0.0 2020-10-19 11:03 UTC

This package is auto-updated.

Last update: 2024-12-17 19:47:58 UTC


README

GraphQL API module for Mageworx Magento 2 SEO Suite Ultimate extension.

Installation

1) Copy-to-paste method

  • Download this module and upload it to the app/code/MageWorx/HtmlSitemapGraphQl directory (create "HtmlSitemapGraphQl" first if missing)

2) Installation using composer (from packagist)

  • Execute the following command: composer require mageworx/module-htmlsitemap-graph-ql

How to use

HtmlSitemapGraphQl module allows displaying the HTML sitemap:

Syntax:

products(
  search: String
  filter: ProductAttributeFilterInput
  pageSize: Int
  currentPage: Int
  sort: ProductAttributeSortInput
): Products

The query includes the following attributes:

  • meta_description
  • meta_keywords
  • categories
  • cms_pages
  • additional_links
  • custom_links

Request:

{mwHtmlSitemap (storeId: 1) {
  categories {
    items {
      title
      url
      level
    }
  }
}
}

Response:

{
  "data": {
    "mwHtmlSitemap": {
      "categories": {
        "items": [
          {
            "title": "What's New",
            "url": "https://store_url/default/what-is-new.html",
            "level": 2
          },
          {
            "title": "test",
            "url": "https://store_url/default/test.html",
            "level": 2
          }
        ]
      }
    }
  }
}