{"id":19700516,"url":"https://github.com/draftbit/graphql-batching-helpers","last_synced_at":"2025-08-17T21:40:24.621Z","repository":{"id":57253359,"uuid":"102131556","full_name":"draftbit/graphql-batching-helpers","owner":"draftbit","description":"📊 GraphQL Batching Helpers for Creating \u0026 Deleting","archived":false,"fork":false,"pushed_at":"2017-09-01T16:42:35.000Z","size":6,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T19:53:17.108Z","etag":null,"topics":["graphql"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/draftbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-01T16:19:21.000Z","updated_at":"2018-12-25T12:26:37.000Z","dependencies_parsed_at":"2022-08-31T22:11:19.807Z","dependency_job_id":null,"html_url":"https://github.com/draftbit/graphql-batching-helpers","commit_stats":null,"previous_names":["preposterous/graphql-batching-helpers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/draftbit/graphql-batching-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draftbit%2Fgraphql-batching-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draftbit%2Fgraphql-batching-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draftbit%2Fgraphql-batching-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draftbit%2Fgraphql-batching-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/draftbit","download_url":"https://codeload.github.com/draftbit/graphql-batching-helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draftbit%2Fgraphql-batching-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270912550,"owners_count":24666746,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"],"created_at":"2024-11-11T21:06:17.891Z","updated_at":"2025-08-17T21:40:24.599Z","avatar_url":"https://github.com/draftbit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL Batching Helpers\n\n## Installation\n\n```\nyarn add graphql-batching-helpers\n\nor\n\nnpm install --save graphql-batching-helpers\n```\n\n## Setup\n- process.env.GRAPHQL_ENDPOINT\n- process.env.GRAPHQL_ACCESS_TOKEN\n\n## Quick Start\n\n```es6\n  await BatchQueryHelpers.batchDeleteAllModels({\n    modelName: 'Contact',\n    first: 100,\n    concurrency: 4,\n  })\n```\nWhat happens in order:\n1. generate generate batch query name:\n\n```graphql\nquery getContacts {\n  contacts: allContacts(first: 100) {\n    id\n  }\n}\n```\n\n2. Request first N `Contact`s\n3. If there are more than 0:\n  - Generate match query mutations\n  - Delete first N  with concurrency N\n\n## API\n\n- `generateBatchQuery`\n  - modelName: String (\"Contact\")\n  - first: Int (100)\n- `generateBatchDeleteMutation`\n  - modelName: String (\"Contact\")\n  - id\n- `generateBatchDeleteMutations`\n  - values\n    - id: String (\"xyz\")\n  - options\n    - modelName: String (\"Contact\")\n- `runBatchQuery`\n  - options\n    - modelName: String (\"Contact\")\n    - first: Int (100)\n- `runBatchDelete`\n  - mutations\n  - options\n    - concurrency: Int (4)\n- `batchDeleteAllModels`\n  - options\n    - modelName: String (\"Contact\")\n    - first: Int (100)\n    - concurrency: Int (4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraftbit%2Fgraphql-batching-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdraftbit%2Fgraphql-batching-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraftbit%2Fgraphql-batching-helpers/lists"}