Skip to content

Commit c5ca935

Browse files
author
Alex Paliarush
committed
ENGCOM-1833: Limit list of filterable product fields #26
1 parent 619db2d commit c5ca935

File tree

5 files changed

+1
-17
lines changed

5 files changed

+1
-17
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ input ProductFilterInput @doc(description: "ProductFilterInput defines the filte
441441
min_price: FilterTypeInput @doc(description:"The numeric minimal price of the product. Do not include the currency code.")
442442
max_price: FilterTypeInput @doc(description:"The numeric maximal price of the product. Do not include the currency code.")
443443
special_price: FilterTypeInput @doc(description:"The numeric special price of the product. Do not include the currency code.")
444+
category_ids: FilterTypeInput @doc(description: "An array of category IDs the product belongs to")
444445
options_container: FilterTypeInput @doc(description: "If the product has multiple options, determines where they appear on the product page")
445446
required_options: FilterTypeInput @doc(description: "Indicates whether the product has required options")
446447
has_options: FilterTypeInput @doc(description: "Indicates whether additional attributes have been created for the product")
@@ -491,7 +492,6 @@ input ProductSortInput @doc(description: "ProductSortInput specifies the attrib
491492
news_from_date: SortEnum @doc(description: "The beginning date for new product listings, and determines if the product is featured as a new product")
492493
news_to_date: SortEnum @doc(description: "The end date for new product listings")
493494
custom_layout_update: SortEnum @doc(description: "XML code that is applied as a layout update to the product page")
494-
category_ids: SortEnum @doc(description: "An array of category IDs the product belongs to")
495495
options_container: SortEnum @doc(description: "If the product has multiple options, determines where they appear on the product page")
496496
required_options: SortEnum @doc(description: "Indicates whether the product has required options")
497497
has_options: SortEnum @doc(description: "Indicates whether additional attributes have been created for the product")
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Copyright © Magento, Inc. All rights reserved.
22
# See COPYING.txt for license details.
33

4-
interface ProductInterface {
5-
tax_class_id: Int
6-
}
7-
8-
input ProductSortInput {
9-
tax_class_id: SortEnum
10-
}
11-
124
enum PriceAdjustmentCodesEnum {
135
TAX
146
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ public function testCategoryProducts()
232232
special_price
233233
special_to_date
234234
swatch_image
235-
tax_class_id
236235
thumbnail
237236
thumbnail_label
238237
tier_price
@@ -358,7 +357,6 @@ private function assertAttributes($actualResponse)
358357
'meta_keyword',
359358
'meta_title',
360359
'short_description',
361-
'tax_class_id',
362360
'country_of_manufacture',
363361
'gift_message_available',
364362
'new_from_date',

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ public function testQueryAllFieldsSimpleProduct()
211211
special_price
212212
special_to_date
213213
swatch_image
214-
tax_class_id
215214
thumbnail
216215
thumbnail_label
217216
tier_price
@@ -460,7 +459,6 @@ public function testQueryMediaGalleryEntryFieldsSimpleProduct()
460459
special_price
461460
special_to_date
462461
swatch_image
463-
tax_class_id
464462
thumbnail
465463
thumbnail_label
466464
tier_price
@@ -922,7 +920,6 @@ private function assertEavAttributes($product, $actualResponse)
922920
'meta_keyword',
923921
'meta_title',
924922
'short_description',
925-
'tax_class_id',
926923
'country_of_manufacture',
927924
'gift_message_available',
928925
'news_from_date',

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public function testQueryAllFieldsVirtualProduct()
3636
name
3737
sku
3838
type_id
39-
tax_class_id
4039
updated_at
4140
... on PhysicalProductInterface {
4241
weight
@@ -96,7 +95,6 @@ public function testCannotQueryWeightOnVirtualProductException()
9695
name
9796
sku
9897
type_id
99-
tax_class_id
10098
updated_at
10199
... on PhysicalProductInterface {
102100
weight
@@ -130,7 +128,6 @@ private function assertBaseFields($product, $actualResponse)
130128
['response_field' => 'attribute_set_id', 'expected_value' => $product->getAttributeSetId()],
131129
['response_field' => 'id', 'expected_value' => $product->getId()],
132130
['response_field' => 'name', 'expected_value' => $product->getName()],
133-
['response_field' => 'tax_class_id', 'expected_value' => $product->getTaxClassId()],
134131
['response_field' => 'sku', 'expected_value' => $product->getSku()],
135132
['response_field' => 'type_id', 'expected_value' => $product->getTypeId()]
136133
];

0 commit comments

Comments
 (0)