From ac17c219e7897a1e94de48cb7c482f81620d6782 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Wed, 27 Mar 2019 16:28:55 +0200 Subject: [PATCH 1/2] magento/devdocs#: UrlRewrite endpoint Page: https://devdocs.magento.com/guides/v2.3/graphql/reference/url-resolver.html --- guides/v2.3/graphql/reference/url-resolver.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guides/v2.3/graphql/reference/url-resolver.md b/guides/v2.3/graphql/reference/url-resolver.md index f07f2ec8891..53cc18edeae 100644 --- a/guides/v2.3/graphql/reference/url-resolver.md +++ b/guides/v2.3/graphql/reference/url-resolver.md @@ -19,11 +19,11 @@ The `EntityUrl` output object contains the `id`, `canonical_url`, and `type` att Attribute | Data Type | Description --- | --- | --- - -`canonical_url` | String | The internal relative URL. If the specified `url` is a redirect, the query returns the redirected URL, not the original. +`canonical_url` | String | The canonical_url field is `deprecated`, use relative_url instead. `id` | Int | The ID assigned to the object associated with the specified `url`. This could be a product ID, category ID, or page ID. +`relative_url` | String | The internal relative URL. If the specified url is a redirect, the query returns the redirected URL, not the original. `type` | UrlRewriteEntityTypeEnum | The value of `UrlRewriteEntityTypeEnum` is one of PRODUCT, CATEGORY, or CMS_PAGE. -`url` | String | The URL to resolve. Magento stores product and category URLs with the `.html` extension. CMS URLs do not contain the extension. + ### UrlRewrite object {#UrlRewrite} @@ -55,7 +55,7 @@ The following query returns information about the URL containing `joust-duffle-b { urlResolver(url: "joust-duffle-bag.html") { id - canonical_url + relative_url type } } @@ -68,7 +68,7 @@ The following query returns information about the URL containing `joust-duffle-b "data": { "urlResolver": { "id": 1, - "canonical_url": "catalog/product/view/id/1", + "relative_url": "catalog/product/view/id/1", "type": "PRODUCT" } } @@ -158,4 +158,4 @@ The following product query returns URL rewrite information about the Joust Duff } } } -``` \ No newline at end of file +``` From 9c2dcc2874a95a9fe73767f67d192b4fb50c0aa8 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Wed, 27 Mar 2019 23:05:01 +0200 Subject: [PATCH 2/2] magento/devdocs#: UrlRewrite endpoint --- guides/v2.3/graphql/reference/url-resolver.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/guides/v2.3/graphql/reference/url-resolver.md b/guides/v2.3/graphql/reference/url-resolver.md index 53cc18edeae..b7fdc6a31af 100644 --- a/guides/v2.3/graphql/reference/url-resolver.md +++ b/guides/v2.3/graphql/reference/url-resolver.md @@ -19,11 +19,10 @@ The `EntityUrl` output object contains the `id`, `canonical_url`, and `type` att Attribute | Data Type | Description --- | --- | --- -`canonical_url` | String | The canonical_url field is `deprecated`, use relative_url instead. +`canonical_url` | String | The internal relative URL. If the specified `url` is a redirect, the query returns the redirected URL, not the original. `id` | Int | The ID assigned to the object associated with the specified `url`. This could be a product ID, category ID, or page ID. -`relative_url` | String | The internal relative URL. If the specified url is a redirect, the query returns the redirected URL, not the original. `type` | UrlRewriteEntityTypeEnum | The value of `UrlRewriteEntityTypeEnum` is one of PRODUCT, CATEGORY, or CMS_PAGE. - +`url` | String | The URL to resolve. Magento stores product and category URLs with the `.html` extension. CMS URLs do not contain the extension. ### UrlRewrite object {#UrlRewrite} @@ -55,7 +54,7 @@ The following query returns information about the URL containing `joust-duffle-b { urlResolver(url: "joust-duffle-bag.html") { id - relative_url + canonical_url type } } @@ -68,7 +67,7 @@ The following query returns information about the URL containing `joust-duffle-b "data": { "urlResolver": { "id": 1, - "relative_url": "catalog/product/view/id/1", + "canonical_url": "catalog/product/view/id/1", "type": "PRODUCT" } }