Skip to content

Commit 0cced6c

Browse files
author
Prabhu Ram
committed
PWA-1319: [EY] Routable Interface in GraphQL
- Added type
1 parent f479933 commit 0cced6c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/code/Magento/UrlRewriteGraphQl/Model/Resolver/Route.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function resolve(
6161
$result = $this->entityDataProviderComposite->getData($resultArray['type'], (int)$resultArray['id'], $info);
6262
$result['redirect_code'] = $resultArray['redirect_code'];
6363
$result['relative_url'] = $resultArray['relative_url'];
64+
$result['type'] = $resultArray['type'];
6465
return $result;
6566
}
6667
return null;

app/code/Magento/UrlRewriteGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ type HttpQueryParameter @doc(description: "The object details of target path par
3131
interface RoutableInterface @typeResolver(class: "Magento\\UrlRewriteGraphQl\\Model\\RoutableInterfaceTypeResolver") @doc(description: "Routable entities serve as the model for a rendered page") {
3232
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")
3333
redirect_code: Int! @doc(description: "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")
34+
type: UrlRewriteEntityTypeEnum @doc(description: "One of PRODUCT, CATEGORY, or CMS_PAGE.")
3435
}

0 commit comments

Comments
 (0)