diff --git a/app/code/Magento/CmsGraphQl/Model/Resolver/DataProvider/Page.php b/app/code/Magento/CmsGraphQl/Model/Resolver/DataProvider/Page.php index 8b9766ca311c7..40825e70a994e 100644 --- a/app/code/Magento/CmsGraphQl/Model/Resolver/DataProvider/Page.php +++ b/app/code/Magento/CmsGraphQl/Model/Resolver/DataProvider/Page.php @@ -88,6 +88,8 @@ public function getDataByPageIdentifier(string $pageIdentifier): array } /** + * Convert page data + * * @param PageInterface $page * @return array * @throws NoSuchEntityException diff --git a/app/code/Magento/CmsGraphQl/Model/Resolver/Page.php b/app/code/Magento/CmsGraphQl/Model/Resolver/Page.php index fbd8e26030952..64891cfeaa87a 100644 --- a/app/code/Magento/CmsGraphQl/Model/Resolver/Page.php +++ b/app/code/Magento/CmsGraphQl/Model/Resolver/Page.php @@ -45,7 +45,7 @@ public function resolve( array $value = null, array $args = null ) { - if (!isset($args['id'], $args['identifier'])) { + if (!isset($args['id']) && !isset($args['identifier'])) { throw new GraphQlInputException(__('"Page id/identifier should be specified')); } diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php index 542b00d434db0..d598a463a48a7 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsBlockTest.php @@ -13,6 +13,9 @@ use Magento\TestFramework\TestCase\GraphQlAbstract; use Magento\Widget\Model\Template\FilterEmulate; +/** + * Get CMS Block test + */ class CmsBlockTest extends GraphQlAbstract { /** diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsPageTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsPageTest.php index 53e47185c9866..afbb3d40bc921 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsPageTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Cms/CmsPageTest.php @@ -11,6 +11,9 @@ use Magento\TestFramework\ObjectManager; use Magento\TestFramework\TestCase\GraphQlAbstract; +/** + * Get CMS Page test + */ class CmsPageTest extends GraphQlAbstract { /**