{"id":21826474,"url":"https://github.com/andvea/shopify-graphql-client","last_synced_at":"2025-04-14T05:32:31.156Z","repository":{"id":170121386,"uuid":"634547528","full_name":"andvea/shopify-graphql-client","owner":"andvea","description":"Shopify's GraphQL API with Node and without pain","archived":false,"fork":false,"pushed_at":"2024-09-25T10:31:51.000Z","size":76,"stargazers_count":20,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T08:38:58.495Z","etag":null,"topics":["graphql","javascript","nodejs","shopify","shopify-api"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@andvea/shopify-graphql-client","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andvea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-30T13:44:34.000Z","updated_at":"2024-12-10T10:43:31.000Z","dependencies_parsed_at":"2024-04-28T11:22:29.544Z","dependency_job_id":"ba77be73-34c2-40af-a28f-4784c77c8c71","html_url":"https://github.com/andvea/shopify-graphql-client","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"f879c3c35d0ab5568cf74d1d2271284fbf2ff281"},"previous_names":["andvea/shopify-graphql-client"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvea%2Fshopify-graphql-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvea%2Fshopify-graphql-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvea%2Fshopify-graphql-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andvea%2Fshopify-graphql-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andvea","download_url":"https://codeload.github.com/andvea/shopify-graphql-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248826481,"owners_count":21167697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","javascript","nodejs","shopify","shopify-api"],"created_at":"2024-11-27T18:04:16.746Z","updated_at":"2025-04-14T05:32:31.150Z","avatar_url":"https://github.com/andvea.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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 of using the library:\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/2023-04/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/).\u003cbr/\u003e\nAiming to build a better world is an attitude I learnt from them:\u003cbr/\u003e\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandvea%2Fshopify-graphql-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandvea%2Fshopify-graphql-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandvea%2Fshopify-graphql-client/lists"}