Skip to content

Commit 81984dc

Browse files
committed
magento/graphql-ce#387: Test coverage of getting IDs of CMS page/blocks by GraphQL API
1 parent 263588a commit 81984dc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/code/Magento/CmsGraphQl/Model/Resolver/DataProvider/PageDataProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ private function convertPageData(PageInterface $page)
9797
$pageData = [
9898
'url_key' => $page->getIdentifier(),
9999
PageInterface::PAGE_ID => $page->getId(),
100+
PageInterface::IDENTIFIER => $page->getIdentifier(),
100101
PageInterface::TITLE => $page->getTitle(),
101102
PageInterface::CONTENT => $renderedContent,
102103
PageInterface::CONTENT_HEADING => $page->getContentHeading(),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type Query {
2222

2323
type CmsPage @doc(description: "CMS page defines all CMS page information") {
2424
page_id: Int @doc(description: "Entity ID of CMS page")
25+
identifier: String @doc(description: "Identifier of the CMS page")
2526
url_key: String @doc(description: "URL key of CMS page")
2627
title: String @doc(description: "CMS page title")
2728
content: String @doc(description: "CMS page content")

0 commit comments

Comments
 (0)