Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi Shopify team,
Since around 2 weeks we are experiencing a bug with metafields and especially translated metafields. The Storefront API is giving us outdated content, which we believe to be due to caching.
We use metafields to store custom content of merchants using the Admin API. When we check the Admin API, or Metafields Guru, or Translate & Adapt, we see that the content is properly set.
When we query the content using the Storefront API, we get outdated content around 50% of the time. After a few hours, the content becomes updated, but it's taking very long and sometimes is unpredictable.
We can also reproduce the issue by doing a simple cURL request to the Storefront API where we can see it responding different versions of the same metafield after several tries. This also happens for different translations of the same metafield, when querying using the @inContext directive.
query($key: String!, $namespace: String!) @inContext(country: DE) { shop { metafield(key: $key, namespace: $namespace) { key value namespace } } }
Solved! Go to the solution
This is an accepted solution.
The issue was fixed by Shopify today. It was a caching bug on Shopify EU servers.
https://github.com/Shopify/storefront-api-feedback/discussions/191
Hi Ocastx,
Thanks for flagging this issue - I'll connect with the Storefront API team and see if there's an issue on our side which would explain this caching/ outdated info problem. I'll update here when I hear back.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
The issue was fixed by Shopify today. It was a caching bug on Shopify EU servers.
https://github.com/Shopify/storefront-api-feedback/discussions/191
Hi,
We are seeing this issue on US stores now. Our app uses metafields for a variety of data and they are essential to our functionality - but right now changes we make (using the API) are not updating on the storefront until we force clear the cache in the browser.
Did something change? Is this the same bug? Can we force them not to cache somehow?
Hey Starlynne,
I'd advise creating a discussion in the Storefront API Feedback repository, as provided in the link above. This will help in tracking the bug on Shopify's end, if there is indeed an API bug.
Hope this helps!
We are still facing exactly same issue while fetching metaobjects from storefront api, this is happening for ASIA servers.