MONEI / Shopify-api-node

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

Getting 404 on graphql, not sure why #603

Closed kgrosvenor closed 8 months ago

kgrosvenor commented 1 year ago

I have hidden the crednetials for security reasons, but esseentially i am following the docs properly but im getting 404 on graph ql, it works fine in postman and axios

export const shopify = new Shopify({ shopName: 'https://x.myshopify.com', accessToken: 'shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', apiVersion: '2023-01' })

shopify.graphql(query) .then((theProducts) => console.log('Products', theProducts)) .catch((err) => console.log(err))

RequestError: getaddrinfo ENOTFOUND https://domain.myshopify.com
at ClientRequest.<anonymous> (C:\Users\Kieran\WebstormProjects\projecti\node_modules\shopify-api-node\node_modules\got\dist\source\core\index.js:970:111)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:525:35)
at origin.emit (C:\Users\Kieran\WebstormProjects\project\node_modules\shopify-api-node\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20)
at TLSSocket.socketErrorListener (node:_http_client:502:9)
at TLSSocket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {

code: 'ENOTFOUND', timings: { start: 1683289290567, socket: 1683289290568, lookup: 1683289290568, connect: undefined, secureConnect: undefined, upload: undefined, response: undefined, end: undefined, error: 1683289290568, abort: undefined, throttleStatus: [Object] } } }

jasp1994 commented 1 year ago

What was the issue here? i'm getting the same error.

namhnz commented 9 months ago

Shop name is just "x" in the example, it is not the full url

lpinca commented 8 months ago

I'm closing this due inactivity.