Skip to content

Commit

Permalink
Marked canonical_url field as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshsuhagiya committed Mar 6, 2019
1 parent b35406f commit e6fb2d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function resolve(
if ($urlRewrite) {
$result = [
'id' => $urlRewrite->getEntityId(),
'canonical_url' => $urlRewrite->getTargetPath(),
'relative_url' => $urlRewrite->getTargetPath(),
'type' => $this->sanitizeType($urlRewrite->getEntityType())
];
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type Query {

type EntityUrl @doc(description: "EntityUrl is an output object containing the `id`, `relative_url`, and `type` attributes") {
id: Int @doc(description: "The ID assigned to the object associated with the specified url. This could be a product ID, category ID, or page ID.")
canonical_url: String @deprecated(reason: "The canonical_url field is deprecated, use relative_url instead.")
relative_url: String @doc(description: "The internal relative URL. If the specified url is a redirect, the query returns the redirected URL, not the original.")
type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE.")
}
Expand Down

0 comments on commit e6fb2d7

Please sign in to comment.