I'm using JavaScript buy SDK with Node.js.
const fetch = require('node-fetch');
const shopify = require('shopify-buy');
const client = shopify.buildClient({
storefrontAccessToken: 'MY_STORE_ACCESS_TOKEN',
domain: 'SHOP_URL',
}, fetch);
I'm getting a product ID like this:
const products = yield client.product.fetchAll();
const variantId = products[0].variants[0].id;
const checkout = yield client.checkout.create();
Is there any method to add this product into cart using JavaScript Buy SDK, in the documentation they have specified that this SDK can be used to add a product to the cart too!