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
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024