{"id":16129505,"url":"https://github.com/kenmuse/gh-graphql-query-nodejs","last_synced_at":"2026-05-07T11:32:29.797Z","repository":{"id":117479837,"uuid":"504392933","full_name":"kenmuse/gh-graphql-query-nodejs","owner":"kenmuse","description":"Sample Node.js/TypeScript application showing how to make a GitHub GraphQL query","archived":false,"fork":false,"pushed_at":"2025-02-18T19:33:17.000Z","size":66,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T13:47:03.730Z","etag":null,"topics":["gh-api","graphql","nodejs","sample","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/kenmuse.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-17T04:27:18.000Z","updated_at":"2022-07-01T15:20:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5060979-0176-4e58-85b6-0c145ead5626","html_url":"https://github.com/kenmuse/gh-graphql-query-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kenmuse/gh-graphql-query-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmuse%2Fgh-graphql-query-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmuse%2Fgh-graphql-query-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmuse%2Fgh-graphql-query-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmuse%2Fgh-graphql-query-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenmuse","download_url":"https://codeload.github.com/kenmuse/gh-graphql-query-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenmuse%2Fgh-graphql-query-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32735121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gh-api","graphql","nodejs","sample","typescript"],"created_at":"2024-10-09T22:11:06.827Z","updated_at":"2026-05-07T11:32:29.760Z","avatar_url":"https://github.com/kenmuse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL Query using Node.js/TypeScript\n\nThis sample contains a TypeScript application which runs on Node.js and issues a query for all users in all repositories in a organization. This illustrates GitHub GraphQL queries and iterating through nested cursors.\n\n## Prerequisites\nRunning this application requires a GitHub personal access token (PAT) with the following minimum set of permissions:\n\n- repo\n- admin:org\n- read:user\n\n## Building the code\nRun `npm i` followed by `npm run build` to compile the TypeScript code to JavaScript in the `dist` folder.\n\n## Usage\nThe application can be run using `npm start --  [args]`. At a minimum, the organization name\n(`--org` or `-o`) and a personal access token (`--token` or `-t`) must be provided.\n\nThe full set of options:\n\n| Argument     | Alias | Description                                        | Value                 |\n| ------------ | ----- | -------------------------------------------------- | ----------------------|\n| `--token`    | `-t`  | GH PAT with repo,admin:org,read:user               | string (required)     |\n| `--org`      | `-o`  | GitHub organization name                           | string (required)     |\n| `--prettify` | `-p`  | True for formatted JSON, false for unformatted     | true / **false**      |\n| `--allpages` | `-a`  | True to return all data, false for first page only | **true** / false      |\n| `--allusers` | `-u`  | True to return all users, false for only ADMIN     | true / **false**      |\n| `--format`   | `-f`  | The format for the results                         | csv, json, table      |\n| `--sort`     | `-s`  | The column to use for sorting the results          | repository, users     |\n\n## Docker Image\nThe application can be built into a Docker image which hosts the application and accepts a command line.\nFor example, an image can be created with `docker build . -t orgquery`. It can then be executed with the\ncommand `docker run -it orgquery [args]`.\n\n## Permissions\nThe GraphQL query returns permissions as READ, WRITE, or ADMIN. Permissions at the organization,\nrepository, and team levels are returned.\nA user may have organization-level rights. For example, owners receive ADMIN permissions on all \nrepositories, and internal repositories typically give all organization members READ permissions.\nPermissions can also be explicitly set at the repository level or granted through one or more teams.\nThe highest permission level across these three levels is the user's overall permission.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmuse%2Fgh-graphql-query-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenmuse%2Fgh-graphql-query-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmuse%2Fgh-graphql-query-nodejs/lists"}