-
Notifications
You must be signed in to change notification settings - Fork 154
Incorrect returned values of product_count #214
Comments
@Serunde There is product_count show product's count which has a Visibility is Catalog, Search or Not Visible Individually And, Result items has products which has a Visibility is Catalog, Search Maybe this help to mentor. |
@ronak2ram |
@ronak2ram @Serunde |
@Serunde Yes |
@ronak2ram no, see my answer above. Products that are set to visibility |
@TomashKhamlai |
Query:query category(
$id: Int!
$currentPage: Int!
$pageSize: Int!
) {
category(
id: $id
) {
name
product_count
products(
currentPage: $currentPage
pageSize: $pageSize
) {
items {
id
}
total_count
}
}
} Variables:{
"id": 3,
"currentPage": 6,
"pageSize": 6
} Response:{
"data": {
"category": {
"name": "Gear",
"product_count": 34,
"products": {
"items": [
{
"id": 43
},
{
"id": 44
},
{
"id": 45
},
{
"id": 52
}
],
"total_count": 34
}
}
}
} |
Preconditions
Steps to reproduce
product_count
field with a category id of 3 (gear)total_count
field.Expected result
product_count
matches the total number of items returned from the query. Should be the same number astotal_count
if the inner product query does not have filters.Actual result
Additional Notes
Worth mentioning that the value of
product_count
here is the same as the highest id in the category, despite the gap of products between id 23 and 36.The text was updated successfully, but these errors were encountered: