MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
947 stars 278 forks source link

Get product variant with query not working though url is correctly returning results #571

Closed lacabra-dev closed 1 year ago

lacabra-dev commented 1 year ago

Hi

I am doing the following:

shopifyStore.productVariant .get(null, { query: 'sku:XXA12TA0804080000' }) .then((result) => { console.log(result); }) .catch((error) => { console.error(error); }); And the result is null. However if i step into the function and observe the url being composed and i try to paste it in the browse and make the request it shows me results. How can this be?

lpinca commented 1 year ago

shopify.productVariant.get() requires the product variant ID. It can't be null. See https://shopify.dev/api/admin-rest/2023-01/resources/product-variant#get-variants-variant-id.

lacabra-dev commented 1 year ago

roger that 👍