Shopify Admin API (GraphQL) Sending Outdated/Cached Responses (Product Query)

Hi Team,

We’re creating a page where users have limited ability to update Product information. In this case, they are able to manipulate Product Metafields.

We are able to make changes to a product’s metafields using the **metafieldsSet** mutation with no issue. When we try and refresh the client after successfully performing that mutation, the Shopify Admin API (GraphQL, version 2024-01) seems to be serving out-dated / cached results.

We confirmed this by looking in the admin.shopify.com portal for the store, where we can see the updated details. This contradicts what we see on our client, which is the old results. The results eventually change (within a few seconds), in inconsistent intervals (in a way that mimics a cache bust).

We retrieve the updated metafields as a part of a query for the entire product.

We believe we have disabled all caching in between our server and our client.

Is there a way to opt-out of this behaviour? We’re already overriding the fetch implementation with cache: no-store, but we have no luck. We need near instant feedback here.

Note: This is a (nextjs project)

Thanks,

Sam

It looks like using the product query from the Admin API doesn’t have this same issue, so we have migrated to that. It would be great to understand if this is expected behaviour, especially since we were providing the ‘no-store’ Cache-Control header.

Messed up the title, it should read

Shopify Storefront API (GraphQL) Sending Outdated/Cached Responses (Product Query)