{"_id":"@andvea/shopify-graphql-client","_rev":"5-d909fbabd44e79b14f27ca5870c10be2","name":"@andvea/shopify-graphql-client","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@andvea/shopify-graphql-client","version":"1.0.0","author":"","license":"Apache-2.0","_id":"@andvea/shopify-graphql-client@1.0.0","maintainers":[{"name":"andvea","email":"andvea.polverino@gmail.com"}],"homepage":"https://github.com/andvea/shopify-graphql-client#readme","bugs":{"url":"https://github.com/andvea/shopify-graphql-client/issues"},"dist":{"shasum":"adc2b63e4dc7b6c8a3aac56fc17f37d0d50d4f49","tarball":"https://registry.npmjs.org/@andvea/shopify-graphql-client/-/shopify-graphql-client-1.0.0.tgz","fileCount":4,"integrity":"sha512-znNHfVVL6xW0TY+VKPERQxdPf/staZ7Rkw1pFmRUk5zOODnA7Z+tsKogT48fBjZDzdmxbf7w6SJCaiaVQm9m9A==","signatures":[{"sig":"MEUCIHv4BxMqg1SBoKqZQtmuixxELp09Nm11I+H2aURJ5k7vAiEAoiZnZq0GlDdbM+NUsips4vmO4PxecXk7EXlrcYcQOeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22369},"main":"ShopifyGraphQL.js","type":"module","gitHead":"28006319bb87430eea3305770ede8a8e9c24deb4","scripts":{"test":"npm install;npx eslint shopifyGraphQL.js;mocha"},"_npmUser":{"name":"andvea","email":"andvea.polverino@gmail.com"},"repository":{"url":"git+https://github.com/andvea/shopify-graphql-client.git","type":"git"},"_npmVersion":"8.19.4","description":"⚠️ This project is work in progress, there is no stable release yet","directories":{},"_nodeVersion":"16.20.0","dependencies":{"node-fetch":"^3.2.4"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"9.2.1","dotenv":"^16.0.2","eslint":"^8.39.0","supertest":"6.2.2","node-fetch":"^3.2.4","eslint-config-google":"^0.14.0"},"_npmOperationalInternal":{"tmp":"tmp/shopify-graphql-client_1.0.0_1685206709202_0.3257070797115553","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@andvea/shopify-graphql-client","version":"1.0.1","author":"","license":"Apache-2.0","_id":"@andvea/shopify-graphql-client@1.0.1","maintainers":[{"name":"andvea","email":"andvea.polverino@gmail.com"}],"homepage":"https://github.com/andvea/shopify-graphql-client#readme","bugs":{"url":"https://github.com/andvea/shopify-graphql-client/issues"},"dist":{"shasum":"03e3928b0a7028ba41c9eb0bf1af2e47f83fc139","tarball":"https://registry.npmjs.org/@andvea/shopify-graphql-client/-/shopify-graphql-client-1.0.1.tgz","fileCount":4,"integrity":"sha512-XGcUus2UoOIWC5gZ5Q4m7H8VcXJTeGFyTU/RKpAa79WFf01Dan7zSd+SGsbM18V1V6WRyqIgRZi0XIVJ+KRBcQ==","signatures":[{"sig":"MEYCIQC2vk8M3O7uGB++RMUsfyb+nnilpYSQXh+1lt6v79awgQIhAIGHnwHKdYWwLqvGU33dzLqVNXSQV5eRoubKIYKSpAOT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22213},"main":"ShopifyGraphQL.js","type":"module","gitHead":"9ea52fa6264b2e119d39df4217ec1591450568af","scripts":{"test":"npm install;npx eslint shopifyGraphQL.js;mocha"},"_npmUser":{"name":"andvea","email":"andvea.polverino@gmail.com"},"repository":{"url":"git+https://github.com/andvea/shopify-graphql-client.git","type":"git"},"_npmVersion":"8.19.4","description":"This is a JavaScript module that allows you to invoke Shopify's GraphQL API with Node  without having to worry about all the tedious stuff like retries,  throttling, backoff time and more.  The purpose is to abstract all the [best practices](https://shopi","directories":{},"_nodeVersion":"16.20.0","dependencies":{"node-fetch":"^3.2.4"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"9.2.1","dotenv":"^16.0.2","eslint":"^8.39.0","supertest":"6.2.2","node-fetch":"^3.2.4","eslint-config-google":"^0.14.0"},"_npmOperationalInternal":{"tmp":"tmp/shopify-graphql-client_1.0.1_1685207631423_0.6746432849642663","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@andvea/shopify-graphql-client","version":"1.1.0","author":{"url":"https://github.com/andvea","name":"Andrea Polverino"},"license":"Apache-2.0","_id":"@andvea/shopify-graphql-client@1.1.0","maintainers":[{"name":"andvea","email":"andvea.polverino@gmail.com"}],"homepage":"https://github.com/andvea/shopify-graphql-client#readme","bugs":{"url":"https://github.com/andvea/shopify-graphql-client/issues"},"dist":{"shasum":"dde9e3338477fc3c0f35447b33d4117376f6c0f1","tarball":"https://registry.npmjs.org/@andvea/shopify-graphql-client/-/shopify-graphql-client-1.1.0.tgz","fileCount":4,"integrity":"sha512-dhPL7LMzwnn7A3fFKsnr4UjITYuFhHk3fbVp1PDgdvj0PgRn6srah8+7UW2DxzBC/V2E7dObsl9g2EmdyJT6EA==","signatures":[{"sig":"MEUCIDS0dQBhLVsm3mqytCkYf4rQCqkarx8+eXMutGlO5V28AiEAw14UbrTbZltg/L0wDNBedXHXqacoLRFvPX2KOwfXq3o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23117},"main":"ShopifyGraphQL.js","type":"module","gitHead":"effd51ee9d935c1738122a12fdf9b060a472bfc2","scripts":{"test":"npm install;npx eslint shopifyGraphQL.js;mocha"},"_npmUser":{"name":"andvea","email":"andvea.polverino@gmail.com"},"repository":{"url":"git+https://github.com/andvea/shopify-graphql-client.git","type":"git"},"_npmVersion":"8.19.4","description":"This is a JavaScript module that allows you to invoke Shopify's GraphQL API with Node  without having to worry about all the tedious stuff like retries,  throttling, backoff time and more.  The purpose is to abstract all the [best practices](https://shopi","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"mocha":"9.2.2","dotenv":"^16.0.2","eslint":"^8.39.0","supertest":"6.2.2","eslint-config-google":"^0.14.0"},"_npmOperationalInternal":{"tmp":"tmp/shopify-graphql-client_1.1.0_1698765387289_0.1558964787848236","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@andvea/shopify-graphql-client","version":"1.1.1","author":{"url":"https://github.com/andvea","name":"Andrea Polverino"},"license":"Apache-2.0","_id":"@andvea/shopify-graphql-client@1.1.1","maintainers":[{"name":"andvea","email":"andvea.polverino@gmail.com"}],"homepage":"https://github.com/andvea/shopify-graphql-client#readme","bugs":{"url":"https://github.com/andvea/shopify-graphql-client/issues"},"dist":{"shasum":"9add744fd62b89120bd13c6175483a93feafb717","tarball":"https://registry.npmjs.org/@andvea/shopify-graphql-client/-/shopify-graphql-client-1.1.1.tgz","fileCount":4,"integrity":"sha512-HbNE+r/vczloHjuB2ey59xMg5aIqJ6cEORWstXfPuPwxEPOxymqKorrmcjruo4e9UtB2LD4RZrsAHI1R+gvebQ==","signatures":[{"sig":"MEYCIQCMgHiKv+qehYHg9AnAn5/K+0DiBjdSgikhIFMio4nKUgIhALk1pEbm2LHMK8ZwIV+ik2jIdLCvHPfMb9m3t2JESUlj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23648},"main":"ShopifyGraphQL.js","type":"module","engines":{"node":">= 16.0.0"},"gitHead":"f879c3c35d0ab5568cf74d1d2271284fbf2ff281","scripts":{"test":"npm install;npx eslint shopifyGraphQL.js;mocha"},"_npmUser":{"name":"andvea","email":"andvea.polverino@gmail.com"},"repository":{"url":"git+https://github.com/andvea/shopify-graphql-client.git","type":"git"},"_npmVersion":"8.19.4","description":"This is a JavaScript module that allows you to invoke Shopify's GraphQL API with Node  without having to worry about all the tedious stuff like retries,  throttling, backoff time and more.  The purpose is to abstract all the [best practices](https://shopi","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"mocha":"9.2.2","dotenv":"^16.0.2","eslint":"^8.39.0","supertest":"6.2.2","eslint-config-google":"^0.14.0"},"_npmOperationalInternal":{"tmp":"tmp/shopify-graphql-client_1.1.1_1714301308873_0.9575861886711163","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@andvea/shopify-graphql-client","version":"1.1.2","description":"This is a JavaScript module that allows you to invoke Shopify's GraphQL API with Node  without having to worry about all the tedious stuff like retries,  throttling, backoff time and more.  The purpose is to abstract all the [best practices](https://shopi","main":"ShopifyGraphQL.js","type":"module","scripts":{"test":"npm install;npx eslint shopifyGraphQL.js;mocha --recursive"},"repository":{"type":"git","url":"git+https://github.com/andvea/shopify-graphql-client.git"},"author":{"name":"Andrea Polverino","url":"https://github.com/andvea"},"license":"Apache-2.0","bugs":{"url":"https://github.com/andvea/shopify-graphql-client/issues"},"homepage":"https://github.com/andvea/shopify-graphql-client#readme","devDependencies":{"dotenv":"^16.0.2","eslint":"^8.39.0","eslint-config-google":"^0.14.0","mocha":"9.2.2","supertest":"6.2.2"},"engines":{"node":">= 16.0.0"},"gitHead":"9904854edd6eecd73727e46b0ab1f9352142c0c7","_id":"@andvea/shopify-graphql-client@1.1.2","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-A5HA+PTR3wZlOargSjR9fD5ZsJQYUhTJgBOaM7seG3k7PCf5emxT4czaBfg1/tjPiQdOYzcJVHVkMtZTBt2QBQ==","shasum":"1a7cf2e9fd53aa492467c65381e6ddd1f779841d","tarball":"https://registry.npmjs.org/@andvea/shopify-graphql-client/-/shopify-graphql-client-1.1.2.tgz","fileCount":4,"unpackedSize":24820,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAd+bIjJhneHe79tbtUE7GRHdC9XVqxCTFNQmVJfErpjAiEA2C3ef0VfRRBipVDKf4xmE6c5EChAL7bTxhOmrfSRTm8="}]},"_npmUser":{"name":"andvea","email":"andvea.polverino@gmail.com"},"directories":{},"maintainers":[{"name":"andvea","email":"andvea.polverino@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shopify-graphql-client_1.1.2_1770552328504_0.3440790124860904"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-27T16:58:29.132Z","modified":"2026-02-08T12:05:28.754Z","1.0.0":"2023-05-27T16:58:29.399Z","1.0.1":"2023-05-27T17:13:51.613Z","1.1.0":"2023-10-31T15:16:27.535Z","1.1.1":"2024-04-28T10:48:29.039Z","1.1.2":"2026-02-08T12:05:28.637Z"},"bugs":{"url":"https://github.com/andvea/shopify-graphql-client/issues"},"author":{"name":"Andrea Polverino","url":"https://github.com/andvea"},"license":"Apache-2.0","homepage":"https://github.com/andvea/shopify-graphql-client#readme","repository":{"type":"git","url":"git+https://github.com/andvea/shopify-graphql-client.git"},"description":"This is a JavaScript module that allows you to invoke Shopify's GraphQL API with Node  without having to worry about all the tedious stuff like retries,  throttling, backoff time and more.  The purpose is to abstract all the [best practices](https://shopi","maintainers":[{"name":"andvea","email":"andvea.polverino@gmail.com"}],"readme":"# Shopify GraphQL Client\n\nThis is a JavaScript module that allows you to invoke Shopify's GraphQL API with Node \nwithout having to worry about all the tedious stuff like retries, \nthrottling, backoff time and more. \nThe purpose is to abstract all the [best practices](https://shopify.dev/docs/api/usage/rate-limits#avoiding-rate-limit-errors) \nnecessary for a healthy intensive use of the Shopify GraphQL API, \nso that you can take care of the rest.\n\nHere you can find a list of the major benefits. Please note that some of them\nare still work in progress.\n- **Errors catching**: sometimes there's a mistake to fix, sometimes it's just a \nmatter of time. This library recognizes these two types of errors based on \nShopify's response and abstracts their complexity with simple responses and \nautomation mechanisms.\n- **Backoff timing**: the rate of your requests is automatically adjusted \nbased on response's API usage metadata for smoother distribution, in order to\nreduce the throttled requests.\n- **Automatic retry**: you can configure the library to automatically retry \ntrotthled requests.\n- **Queue**: your requests are automatically placed in a FIFO queue which \nguarantees the order of execution.\n- **HTTP/2 support**: all the requests are made via HTTP/2 and the session \nremains active as long as the queue is not empty. It's a mechanism that \nallows you to save time, especially with many requests in the queue.\n- **No dependencies**: a lightweight solution that minimizes potential conflicts\n- Cache *(Work in progress)*\n- Metrics *(Work in progress)*\n\n## Table of Contents\n- [Installation](#Installation)\n- [Usage](#Usage)\n  - [Basic example](#Usage)\n  - [Parameters](#Parameters)\n- [Tests](#Tests)\n- [Getting help](#Getting%20help)\n- [Contribution](#Contribution)\n- [Credits](#Credits)\n\n## Installation\nYou can install the library via npm\n```\nnpm install @andvea/shopify-graphql-client --save\n```\n\n## Usage\nThis is a basic example showing how to use the library with Shopify API 2025 and later:\n```javascript\nimport {ShopifyGraphQL} from '@andvea/shopify-graphql-client';\n\nvar shopifyGraphQL =\n  new ShopifyGraphQL({\n    apiEndpoint: 'https://test.myshopify.com/admin/api/2026-01/graphql.json',\n    apiKey: 'shpca...b32',\n    retryThrottles: true,\n    maxConcurrentRequests: 5\n  });\n\ntry {\n  var shopifyResponse = \n    await shopifyGraphQL.request(JSON.stringify({\n      query: `mutation webhookSubscriptionDelete($id: ID!) {\n        webhookSubscriptionDelete(id: $id) { \n          userErrors { \n            field \n            message \n          } \n        } \n      }`,\n      variables: {id: 'gid://shopify/WebhookSubscription/xxx'}\n    }));\n    \n  console.log(shopifyResponse);\n} catch(reqErr) {\n  console.log('Something went wrong!');\n  console.log(reqErr);\n}\n```\nTo use API versions before 2025, do the following:\n```javascript\nimport {ShopifyGraphQL} from '@andvea/shopify-graphql-client';\n\nvar shopifyGraphQL =\n  new ShopifyGraphQL({\n    apiEndpoint: 'https://test.myshopify.com/admin/api/2023-04/graphql.json',\n    apiKey: 'shpca...b32',\n    retryThrottles: true,\n    maxConcurrentRequests: 5\n  });\n\ntry {\n  var shopifyResponse = \n    await shopifyGraphQL.request(`{ \n      shop { \n        id \n      } \n    }`);\n    \n  console.log(shopifyResponse);\n} catch(reqErr) {\n  console.log('Something went wrong!');\n  console.log(reqErr);\n}\n```\n\n### Parameters\n- `apiEndpoint`: full API endpoint, eg `https://test.myshopify.com/admin/api/2026-01/graphql.json`\n- `apiKey`: the shop's API key\n- `retryThrottles`: whether throttled requests should be automatically retried\n- `maxConcurrentRequests`: how many requests can be sent at the same time. \nThis concurrency capacity refers to how many requests can be sent \neven if Shopify hasn't responded yet\n\n## Tests\nTo get an overview of tests, read the [related section in the Contributing guide](CONTRIBUTING.md#tests).\n\n## Getting help\nFeel free to open [an issue](https://github.com/andvea/shopify-graphql-client/issues/new) if you have any problem.\n\n## Contribution\nContributions are more than welcome. To learn more about, read the [Contributing guide](CONTRIBUTING.md).\n\n## Credits\nMy thanks go to my friends at [Uppa](https://www.uppa.it/).<br/>\nAiming to build a better world is an attitude I learnt from them:<br/>\n_Chiara B., Chiara R., Claudia L.G., Daniela M., Francesca G., Giulia B., \nLidia D., Lorenzo B., Lorenzo C., Pierpaolo D.M., Sergio C.N., Virginia V._\n","readmeFilename":"README.md"}