View Issue Details

IDProjectCategoryView StatusLast Update
0007421GraphQL StorefrontGeneralpublic2024-05-28 14:15
Reportermichael_keiluweit Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Versionv2.0.1 
Fixed in Versionv3.1.0 
Summary0007421: Empty variant list as response, in case performance option blLoadVariants is set to false
DescriptionIf the performance option blLoadVariants is disabled, then the response of the query product does not contain any variants.
Steps To ReproduceLatest 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": []
    }
  }
}
TagsNo tags attached.

Activities

QA

2023-02-17 15:56

administrator   ~0015049

Last edited: 2023-02-17 16:00

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]

SvenBrunk

2023-02-21 08:55

administrator   ~0015050

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.