From 950dd6fff14c64f6762c603d585e9c03a4e77128 Mon Sep 17 00:00:00 2001 From: Pratik Oza <33807558+mage2pratik@users.noreply.github.com> Date: Thu, 14 Mar 2019 00:21:14 +0530 Subject: [PATCH 1/3] Update url-resolver.md --- guides/v2.3/graphql/reference/url-resolver.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/guides/v2.3/graphql/reference/url-resolver.md b/guides/v2.3/graphql/reference/url-resolver.md index 9197346356b..be5244e0a21 100644 --- a/guides/v2.3/graphql/reference/url-resolver.md +++ b/guides/v2.3/graphql/reference/url-resolver.md @@ -19,8 +19,7 @@ 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. +`relative_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. `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. @@ -158,4 +157,4 @@ The following product query returns URL rewrite information about the Joust Duff } } } -``` \ No newline at end of file +``` From d7aa8e718018cea0da695613762ea8e313383808 Mon Sep 17 00:00:00 2001 From: Pratik Oza Date: Thu, 14 Mar 2019 00:56:39 +0530 Subject: [PATCH 2/3] Fixed table structure with removing space and removed deprecated attribute --- guides/v2.3/graphql/reference/url-resolver.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/v2.3/graphql/reference/url-resolver.md b/guides/v2.3/graphql/reference/url-resolver.md index be5244e0a21..5e6c81b2277 100644 --- a/guides/v2.3/graphql/reference/url-resolver.md +++ b/guides/v2.3/graphql/reference/url-resolver.md @@ -19,8 +19,8 @@ The `EntityUrl` output object contains the `id`, `canonical_url`, and `type` att Attribute | Data Type | Description --- | --- | --- -`relative_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. From 36113344a17ea6a425587ecca1aaa2ccebed4d28 Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Tue, 26 Mar 2019 12:00:18 -0500 Subject: [PATCH 3/3] update samples I updated the samples to include `relative_url` instead of `canonical_url`. I also made some cosmetic edits. --- guides/v2.3/graphql/reference/url-resolver.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guides/v2.3/graphql/reference/url-resolver.md b/guides/v2.3/graphql/reference/url-resolver.md index 5e6c81b2277..5f62504e262 100644 --- a/guides/v2.3/graphql/reference/url-resolver.md +++ b/guides/v2.3/graphql/reference/url-resolver.md @@ -23,6 +23,7 @@ Attribute | Data Type | Description `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. +{:style="table-layout:auto;"} ### UrlRewrite object {#UrlRewrite} @@ -54,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 } } @@ -62,12 +63,12 @@ The following query returns information about the URL containing `joust-duffle-b **Response** -``` text +``` json { "data": { "urlResolver": { "id": 1, - "canonical_url": "catalog/product/view/id/1", + "relative_url": "catalog/product/view/id/1", "type": "PRODUCT" } } @@ -98,7 +99,7 @@ The following product query returns URL rewrite information about the Joust Duff **Response** -```text +```json { "data": { "products": {