Ecommerce Shopify WordPress Discussion

Getting error while getting Product by Varient Id in Angular js and Shopify Graph QL

async getProductByVarientId(varientid, pId = null) { const client = this.client; let query = client.query((root) => { root.add('node', { args: { id: varientid }, alias: 'productvariant' }, (node) => { node.add('id'); node.addInlineFragmentOn('ProductVariant', (variants) => { variants.add('id'); variants.add('product'); variants.add('title'); variants.add('price'); // variants.add('price', (price) => { // price.add('amount'); // price.add('currencyCode'); // }); variants.add('image', (image) => { image.add('src'); image.add('id'); image.add('altText'); }); }); }); }); return await client.send(query).then(({ model, data }) => { console.log('>++++++++', model); // Check if 'productvariant' is defined before accessing its properties return (model && model.productvariant) ? model.productvariant : ''; }); } I was trying to get the product details by varient Id, this code was working fine from last 1 year. This code is written in AngularJs with Shopify Graph QL. enter image description here
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.