Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mkostevich committed Feb 22, 2023
1 parent 7ec696d commit de978c4
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ GraphQL API module for Mageworx [Magento 2 SEO Suite Ultimate](https://www.magew

## How to use

**[SeoRedirectsGraphQl](https://github.com/mageworx/MageWorx_SeoRedirectsGraphQl)** module modifies the current values of the existing Output attributes for [urlResolver query](https://devdocs.magento.com/guides/v2.4/graphql/queries/url-resolver.html) if there is at least 1 Mageworx redirect for the 'requested URL' entity.
**[SeoRedirectsGraphQl](https://github.com/mageworx/MageWorx_SeoRedirectsGraphQl)** module modifies the current values of the existing Output attributes for [urlResolver query](https://devdocs.magento.com/guides/v2.4/graphql/queries/url-resolver.html) and for [routes query](https://developer.adobe.com/commerce/webapi/graphql/schema/products/queries/route/) if there is at least 1 Mageworx redirect for the 'requested URL' entity.

This module is compatible with:
<ul>
<li>redirects for deleted products</li>
<li>custom redirects with Request Entity Type and Target Entity Type equal to Product, Category or CMS Page</li>
</ul>

For example, urlResolver query has the following syntax:
### urlResolver query

For example, `urlResolver` query has the following syntax:

```
{urlResolver(url: String!): EntityUrl}
Expand Down Expand Up @@ -52,3 +54,37 @@ For example, urlResolver query has the following syntax:
}
}
```

### routes query

For example, `route` query has the following syntax:

```
{route(url: String!): RoutableInterface}
```

**Request:**

```
{
route(url: "savvy-shoulder-tote.html") {
relative_url
redirect_code
type
}
}
```

**Response:**

```
{
"data": {
"route": {
"relative_url": "erika-running-short.html",
"redirect_code": 301,
"type": "PRODUCT"
}
}
}
```

0 comments on commit de978c4

Please sign in to comment.