View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007421 | GraphQL Storefront | General | public | 2023-02-17 14:47 | 2024-05-28 14:15 |
| Reporter | michael_keiluweit | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | v2.0.1 | ||||
| Fixed in Version | v3.1.0 | ||||
| Summary | 0007421: Empty variant list as response, in case performance option blLoadVariants is set to false | ||||
| Description | If the performance option blLoadVariants is disabled, then the response of the query product does not contain any variants. | ||||
| Steps To Reproduce | Latest Enterprise Edition, latest GraphQL Storefront module. 1. Goto admin area -> Master Settings -> Core Settings -> Perform. 2. Disable the option "Load Variants in Lists (Search Results, Categories). This uses much Memory and may cause Performance Problems on small Servers." 3. Execute this query: {
product(productId: "531f91d4ab8bfb24c4d04e473d246d0b") {
id
active
title
sku
ean
variants {
id
title
}
}
}Expected: {
"data": {
"product": {
"id": "531f91d4ab8bfb24c4d04e473d246d0b",
"active": true,
"title": "Kuyichi Jeans KYLE",
"sku": "3560",
"ean": "",
"variants": [
{
"id": "5316bbab81c19d81d5e36e59ecd7f506",
"title": "Kuyichi Jeans KYLE"
}
]
}
}
}Actual: {
"data": {
"product": {
"id": "531f91d4ab8bfb24c4d04e473d246d0b",
"active": true,
"title": "Kuyichi Jeans KYLE",
"sku": "3560",
"ean": "",
"variants": []
}
}
} | ||||
| Tags | No tags attached. | ||||
|
|
Thanks for your report. I can reproduce the described issue. If you only consider the option blLoadVariants, the behavior seems correct, since the option is for the complete loading of the variants, no matter which place. See description in source code: https://github.com/OXID-eSales/oxideshop_ce/blob/87d0422c6e5e5d97cc9f2f2c161ee84943047822/source/Application/Model/Article.php#L101 However, the description in administration area tells a different story, which fits the shop's behavior not using GraphQL. The shop always displays the variants on the product details page due to the set of the option in the corresponding class: https://github.com/OXID-eSales/oxideshop_ce/blob/b-7.0.x/source/Application/Component/Widget/ArticleDetails.php#L872 Since the behavior differs from GraphQL Interface to shop's frontend I acknowledge the issue. Product Management must decide what to change. [sp] |
|
|
This needs to be changed in the Storefront Module. The place is not a list and a detail request for a single product should always return the variants if there are some. |