Skip to content

Commit be525d1

Browse files
author
vitaliyboyko
committed
graphQl-44: refactored resolver name
1 parent 2fcc183 commit be525d1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductTextAttribute.php renamed to app/code/Magento/CatalogGraphQl/Model/Resolver/Product/ProductComplexTextAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/**
1818
* Resolve rendered content for attributes where HTML content is allowed
1919
*/
20-
class ProductTextAttribute implements ResolverInterface
20+
class ProductComplexTextAttribute implements ResolverInterface
2121
{
2222
/**
2323
* @var OutputHelper

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ interface ProductInterface @typeResolver(class: "Magento\\CatalogGraphQl\\Model\
248248
id: Int @doc(description: "The ID number assigned to the product") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\EntityIdToId")
249249
name: String @doc(description: "The product name. Customers use this name to identify the product.")
250250
sku: String @doc(description: "A number or code assigned to a product to identify the product, options, price, and manufacturer")
251-
description: ComplexTextValue @doc(description: "Detailed information about the product. The value can include simple HTML tags.") @resolver(class: "\\Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\ProductTextAttribute")
252-
short_description: ComplexTextValue @doc(description: "A short description of the product. Its use depends on the theme.") @resolver(class: "\\Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\ProductTextAttribute")
251+
description: ComplexTextValue @doc(description: "Detailed information about the product. The value can include simple HTML tags.") @resolver(class: "\\Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\ProductComplexTextAttribute")
252+
short_description: ComplexTextValue @doc(description: "A short description of the product. Its use depends on the theme.") @resolver(class: "\\Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\ProductComplexTextAttribute")
253253
special_price: Float @doc(description: "The discounted price of the product")
254254
special_from_date: String @doc(description: "The beginning date that a product has a special price")
255255
special_to_date: String @doc(description: "The end date that a product has a special price")

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductViewTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public function testQueryAllFieldsSimpleProduct()
266266
$this->assertArrayHasKey(0, $response['products']['items']);
267267
$this->assertBaseFields($product, $response['products']['items'][0]);
268268
$this->assertEavAttributes($product, $response['products']['items'][0]);
269-
$this->assertTextEavAttributes($product, $response['products']['items'][0]);
269+
$this->assertComplexTextAttributes($product, $response['products']['items'][0]);
270270
$this->assertOptions($product, $response['products']['items'][0]);
271271
$this->assertTierPrices($product, $response['products']['items'][0]);
272272
$this->assertArrayHasKey('websites', $response['products']['items'][0]);
@@ -950,7 +950,7 @@ private function assertEavAttributes($product, $actualResponse)
950950
* @param ProductInterface $product
951951
* @param array $actualResponse
952952
*/
953-
private function assertTextEavAttributes($product, $actualResponse)
953+
private function assertComplexTextAttributes($product, $actualResponse)
954954
{
955955
$eavAttributes = [
956956
'description',

0 commit comments

Comments
 (0)