From e9020c267031c26d625cbe1129723998d559b575 Mon Sep 17 00:00:00 2001 From: Prince Patel Date: Thu, 28 Mar 2019 14:29:22 +0530 Subject: [PATCH 1/2] Update url-resolver.md --- 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 5f62504e262..7b0b1c8a05f 100644 --- a/guides/v2.3/graphql/reference/url-resolver.md +++ b/guides/v2.3/graphql/reference/url-resolver.md @@ -15,7 +15,7 @@ The `urlResolver` query returns the canonical URL for a specified product, categ ### EntityUrl attributes -The `EntityUrl` output object contains the `id`, `canonical_url`, and `type` attributes. +The `EntityUrl` output object contains the `id`, `relative_url`, and `type` attributes. Attribute | Data Type | Description --- | --- | --- From 209708c89c27c6f7651dcd701276cff952f8a07b Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Tue, 23 Apr 2019 16:40:22 -0500 Subject: [PATCH 2/2] Update url-resolver.md Listed canonical_url as deprecated and general cleanup. --- guides/v2.3/graphql/reference/url-resolver.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/guides/v2.3/graphql/reference/url-resolver.md b/guides/v2.3/graphql/reference/url-resolver.md index 7b0b1c8a05f..70a024681c4 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`, `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. `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} @@ -33,7 +33,6 @@ Attribute | Type | Description --- | --- | --- `parameters` | [[`HttpQueryParameter`]](#HttpQueryParameter) | An array of target path parameters `url` | String | The request URL -{:style="table-layout:auto;"} ### HttpQueryParameter object {#HttpQueryParameter} @@ -43,7 +42,6 @@ Attribute | Type | Description --- | --- | --- `name` | String | The parameter name, such as `id` `value` | String | The value assigned to the parameter -{:style="table-layout:auto;"} ## Example usage @@ -51,7 +49,7 @@ The following query returns information about the URL containing `joust-duffle-b **Request** -``` text +```text { urlResolver(url: "joust-duffle-bag.html") { id @@ -63,7 +61,7 @@ The following query returns information about the URL containing `joust-duffle-b **Response** -``` json +```json { "data": { "urlResolver": { @@ -79,7 +77,7 @@ The following product query returns URL rewrite information about the Joust Duff **Request** -``` text +```text { products(search: "Joust") { items {