Liquid, Javascript, thèmes
Hi everyone
We are facing an issue with the validity of the data we get out of a product query using the admin graphql api.
Here is the query we use :
query getProduct($id: ID!) { product(id: $id) { variants(first: 10) { nodes { id price_eu: contextualPricing(context: {country: FR}) { price { amount currencyCode } } price_uk: contextualPricing(context: {country: GB}) { price { amount currencyCode } } price_us: contextualPricing(context: {country: US}) { price { amount currencyCode } } } } } }
the contextual pricing amount differs from the call we make locally or via Postman with the one executed from vercel,
On one hand we have the correct response (from local or Postman):
{ "data": { "product": { "variants": { "nodes": [ { "price_eu": { "price": { "amount": "1400.0", "currencyCode": "EUR" } }, "price_uk": { "price": { "amount": "1281.0", "currencyCode": "GBP" } }, "price_us": { "price": { "amount": "1425.0", "currencyCode": "USD" } } } ] } } }, } }
On the other hand we have an incorrect response (from vercel call)
{ "data": { "product": { "variants": { "nodes": [ { "price_eu": { "price": {
amount: '1388.34', "currencyCode": "EUR" } }, } ] } } }, }
As you can see the price_eu fiel is not sending the same value,
What is the solution for this problem?
this is a very big issue for us as it create problems for customer visiting the shop.
Thanks for your help and have a good day
Utilisateur | CLASSEMENT |
---|---|
6 | |
5 | |
3 | |
2 | |
2 |
La création d'une entreprise peut s'avérer difficile. Il y a beaucoup de choses à mettre e...
By Océanne Nov 29, 2023Le Black Friday Cyber Monday (BFCM), ou Vendredi Fou et Cyber Lundi, 2023 se profile à l'h...
By Océanne Oct 18, 2023Cet article de blog est un récapitulatif du webinaire Se préparer à BFCM : Comment lanc...
By Jacqui Oct 11, 2023