App reviews, troubleshooting, and recommendations
I'm unable to execute any queries against the graphql client. Following all examples i can find but the client.query method always throws:
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer or Uint8Array. Received undefined
let session = await Shopify.Utils.loadOfflineSession(shop); const client = new Shopify.Clients.Graphql(session.shop, session.accessToken); await client.query({ data: `{ products (first: 10) { edges { node { id title } } } }`, });
throws:
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer or Uint8Array. Received undefined (node:14788) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer or Uint8Array. Received undefined at write_ (_http_outgoing.js:722:11) at ServerResponse.write (_http_outgoing.js:687:15) at Server.<anonymous> (XXX\shopify\dist\index.js:173:34) at Generator.throw (<anonymous>) at rejected (XXX\shopify\dist\index.js:29:65) at processTicksAndRejections (internal/process/task_queues.js:95:5) (Use node --trace-warnings ... to show where the warning was created)
What am i missing or doing wrong? Seems like it should be pretty straight forward, but no queries ever execute successfully against the graphql. Apologies, this is my first attempt at graphql. Thank you.
Nevermind, I was conflating 2 errors
The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024