From 1c625347e61c1449a3b10bbbb9653fabc468e743 Mon Sep 17 00:00:00 2001 From: vinoth Date: Sun, 8 Mar 2020 08:35:37 +0530 Subject: [PATCH 1/3] Updating EntityUrl output object in urlResolvers query --- src/guides/v2.3/graphql/queries/url-resolver.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/guides/v2.3/graphql/queries/url-resolver.md b/src/guides/v2.3/graphql/queries/url-resolver.md index 317bac1274f..7929626b455 100644 --- a/src/guides/v2.3/graphql/queries/url-resolver.md +++ b/src/guides/v2.3/graphql/queries/url-resolver.md @@ -26,7 +26,9 @@ The following query returns information about the URL containing `joust-duffle-b urlResolver(url: "joust-duffle-bag.html") { id relative_url + redirectCode type + } } ``` @@ -39,6 +41,7 @@ The following query returns information about the URL containing `joust-duffle-b "urlResolver": { "id": 1, "relative_url": "catalog/product/view/id/1", + "redirectCode": 0, "type": "PRODUCT" } } @@ -63,7 +66,7 @@ Attribute | Data Type | Description `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. +`redirectCode` | Int | 301 or 302 HTTP code for url permanent or temporary redirect or 0 for the 200 no redirect. ## Related topics From fbd7fbd7a968c624584e50b0a7aeea55724aecea Mon Sep 17 00:00:00 2001 From: vinoth Date: Mon, 9 Mar 2020 22:11:59 +0530 Subject: [PATCH 2/3] changes --- src/guides/v2.3/graphql/queries/url-resolver.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/guides/v2.3/graphql/queries/url-resolver.md b/src/guides/v2.3/graphql/queries/url-resolver.md index 7929626b455..3cdf1f8be90 100644 --- a/src/guides/v2.3/graphql/queries/url-resolver.md +++ b/src/guides/v2.3/graphql/queries/url-resolver.md @@ -28,7 +28,6 @@ The following query returns information about the URL containing `joust-duffle-b relative_url redirectCode type - } } ``` @@ -66,7 +65,7 @@ Attribute | Data Type | Description `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. -`redirectCode` | Int | 301 or 302 HTTP code for url permanent or temporary redirect or 0 for the 200 no redirect. +`redirectCode` | Int | 301 or 302 HTTP code for url permanent or temporary redirect. Contains 0 when there's no redirect. ## Related topics From 0bcf4ee01410dcd484508c250edaa0f712d7dccb Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Mon, 9 Mar 2020 12:49:20 -0500 Subject: [PATCH 3/3] Update url-resolver.md --- src/guides/v2.3/graphql/queries/url-resolver.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/guides/v2.3/graphql/queries/url-resolver.md b/src/guides/v2.3/graphql/queries/url-resolver.md index 3cdf1f8be90..0d09e6fc30c 100644 --- a/src/guides/v2.3/graphql/queries/url-resolver.md +++ b/src/guides/v2.3/graphql/queries/url-resolver.md @@ -61,11 +61,11 @@ The `EntityUrl` output object contains the `id`, `relative_url`, and `type` attr Attribute | Data Type | Description --- | --- | --- -`canonical_url` | String | 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. -`redirectCode` | Int | 301 or 302 HTTP code for url permanent or temporary redirect. Contains 0 when there's no redirect. +`canonical_url` | String | 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 +`redirectCode` | Int | Contains 0 when there is no redirect error. A value of 301 indicates the URL of the requested resource has been changed permanently, while a value of 302 indicates a temporary redirect +`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 ## Related topics