Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I don't know what label should I choose for this, so please forgive me.
I encountered a really bizarre problem, where API request results differ between GraphiQL, Postman and via Python Request.
Request:
{ product(id: "gid://shopify/Product/7161071599788") { variants(first: 10) { edges { node { unitPriceMeasurement { quantityValue } } } } } }
GraphiQL result (this is what I'm after):
{ "data": { "product": { "variants": { "edges": [ { "node": { "unitPriceMeasurement": { "quantityValue": 1.44 } } } ] } } }, "extensions": { "cost": { "requestedQueryCost": 11, "actualQueryCost": 5, "throttleStatus": { "maximumAvailable": 4000, "currentlyAvailable": 3995, "restoreRate": 200 } } } }
Postman result:
{ "errors": [ { "message": "Field 'unitPriceMeasurement' doesn't exist on type 'ProductVariant'", "locations": [ { "line": 11, "column": 21 } ], "path": [ "query", "product", "variants", "edges", "node", "unitPriceMeasurement" ], "extensions": { "code": "undefinedField", "typeName": "ProductVariant", "fieldName": "unitPriceMeasurement" } } ] }
Python Response result:
{ 'data': { 'product': None } }
All using the same API version and token.
I'm not too worried about Postman, but in Python this only happen with 2 products (what I've tested so far).
Can anyone enlighten me?
Solved! Go to the solution
This is an accepted solution.
Please check if the version of the API used for GraphiQL vs Postman vs Python Request is consistent.
This is an accepted solution.
Please check if the version of the API used for GraphiQL vs Postman vs Python Request is consistent.
Thanks Kyle, while that wasn't the issue, I tried sending the request using admin API 2024-10 instead of storefront API and now it works everywhere.
It's been working well with storefront API since March, and it only started spitting issues just now. Maybe it was deprecated?
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025