This article provides a patch for the issue where GraphQL GET
request returns outdated information if the customer changes product information.
Adobe Commerce on cloud infrastructure v2.3.5.
GraphQL requests are cached by Fastly, and the cached version is retrieved for each subsequent request from Fastly. When a product is re-saved in the Adobe Commerce backend, the Fastly cache should invalidate when a product is updated. However, it remains valid.
Steps to reproduce:
GET http:///graphql?query={products(currentPage:1,pageSize:6,filter:{web_ready:{eq:"1"},category_id:{eq:"1521"}}){total_count,items{__typename,id,sku,name}}}
Expected results:
The X-Cache
header contains MISS
.
Actual results:
The X-Cache
header contains HIT
, which means the response is cached.
Disable GraphQL product cache with the patch provided in this article.
The patch is attached to this article. To download it, scroll down to the end of the article and click the file name or click the following link:
MDVA-28559_EE_2.3.5-p1_COMPOSER_v1.patch
The patch was created for:
The patch is also compatible (but might not solve the issue) with the following Adobe Commerce versions and editions:
See How to apply a composer patch provided by Adobe for instructions on how to apply a composer patch.