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 Shopify shop name from object with correct type #649

Closed danielvoelk closed 6 months ago

danielvoelk commented 6 months ago

When I try to get the shop name, I get the error:

shopify.baseUrl.hostname

Property 'baseUrl' does not exist on type 'Shopify'.

I checked the type definition and it's not there. Why?

What is the correct approach to get the shop name from the shopify instance?

`const shopify: Shopify = new Shopify({ shopName: '', accessToken: '', autoLimit: true, apiVersion: process.env.SHOPIFY_API_VERSION, });

// get shop name shopify...`

lpinca commented 6 months ago

What is the correct approach to get the shop name from the shopify instance?

const shop = await shopify.shop.get();
danielvoelk commented 6 months ago

Great, that worked. thank you