Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-sss authored Sep 21, 2021
1 parent 21e90a5 commit 12ffa22
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ GraphQL API module for Mageworx [Magento 2 SEO Suite Ultimate](https://www.magew
## How to use
**[SeoBaseGraphQL](https://github.com/mageworx/MageWorx_SeoBaseGraphQl)** module extends existing Output attributes for Product, Category, CmsPage queries and includes:

- canonical_url
- mw_canonical_url
- - url
- - code
- meta_robots
- mw_hreflangs
- - items
- - - url
- - - code

**Note!** In the context of canonical URLs, the code means **store code**. In the context of hreflang URLs, the code means **hreflang code** - for example *x-default*, *en*, *en_US*, etc.

Other attribute is defined according to the guide: https://devdocs.magento.com/guides/v2.4/graphql/queries/products.html#productfilterinput-attributes.

Product, Category, CmsPage queries have the syntax similar to the Magento user guide.
Product, Category, CMS Page queries have the syntax similar to the Magento user guide.

For example, product query has the following syntax:

Expand All @@ -42,7 +46,10 @@ products(
products(filter: {sku: {eq: "24-WG02"}}) {
total_count
items {
canonical_url
mw_canonical_url {
url
code
}
meta_robots
mw_hreflangs {
items {
Expand All @@ -65,10 +72,22 @@ products(
"products": {
"items": [
{
"canonical_url": "https://store_url/default/didi-sport-watch.html",
"mw_canonical_url": {
"url": "didi-sport-watch.html",
"code": "store_code"
}
"meta_robots": null,
"mw_hreflangs": {
"items": null
"items": [
{
"url": "didi-sport-watch.html",
"code": "en"
},
{
"url": "didi-sport-uhr.html",
"code": "de"
}
]
},
"name": "Didi Sport Watch",
"sku": "24-WG02"
Expand Down

0 comments on commit 12ffa22

Please sign in to comment.