{"id":15465310,"url":"https://github.com/gr2m/github-openapi-graphql-query","last_synced_at":"2025-04-22T10:19:44.339Z","repository":{"id":37080276,"uuid":"380609487","full_name":"gr2m/github-openapi-graphql-query","owner":"gr2m","description":"Send GraphQL queries against GitHub's REST API specifications","archived":false,"fork":false,"pushed_at":"2025-01-03T19:02:48.000Z","size":526,"stargazers_count":7,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T19:08:25.383Z","etag":null,"topics":[],"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/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"gr2m"}},"created_at":"2021-06-26T22:49:06.000Z","updated_at":"2025-01-03T19:02:25.000Z","dependencies_parsed_at":"2024-02-15T18:01:36.971Z","dependency_job_id":"d9bee222-8e9e-4292-9d13-380622edbbd9","html_url":"https://github.com/gr2m/github-openapi-graphql-query","commit_stats":{"total_commits":135,"total_committers":5,"mean_commits":27.0,"dds":"0.28148148148148144","last_synced_commit":"c9dd433e19e11ca5dad3414e24118159895c7597"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-openapi-graphql-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-openapi-graphql-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-openapi-graphql-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-openapi-graphql-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/github-openapi-graphql-query/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247751043,"owners_count":20989876,"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":[],"created_at":"2024-10-02T01:00:46.692Z","updated_at":"2025-04-22T10:19:44.323Z","avatar_url":"https://github.com/gr2m.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gr2m"],"categories":[],"sub_categories":[],"readme":"# GitHub OpenAPI GraphQL Query\n\n\u003e Send GraphQL queries against the OpenAPI specification of GitHub's REST API\n\nThe OpenAPI specification is published to [@github/openapi](https://www.npmjs.com/package/@github/openapi). All REST API endpoints for https://api.github.com as well as the supported GitHub Enterprise (GHE) versions can be queried.\n\n# Usage\n\n```js\nconst graphql = require(\"github-openapi-graphql-query\");\nconst query = `\n  {\n    endpoints {\n      name\n      method\n      url\n      parameters {\n        name\n        type\n      }\n    }\n  }\n`;\n\ngraphql(query).then(\n  ({ data }) =\u003e console.log(data),\n  (error) =\u003e console.error(error),\n);\n```\n\nThe query loads the definitions from the [latest `@github/openapi` release on GitHub](https://unpkg.com/@github/openapi/). An optional `endpoints(version: \"4.6.6\") { ... }` parameter can be passed to query a specific version.\n\nAll releases can be retrieved using the following query\n\n```graphql\n{\n  releases {\n    version\n    createdAt\n  }\n}\n```\n\nThe latest release can be retrieved, too\n\n```graphql\n{\n  lastRelease {\n    version\n    createdAt\n  }\n}\n```\n\n## GitHub Enterprise Cloud (GHEC) compatibility mode\n\nAs of `v8.0.0` of [`octokit/openapi`](https://github.com/octokit/openapi), the `api.github.com` specification no longer include API operations for GitHub Enterprise Cloud (GHEC). In order to avoid this breaking change, the GHEC compatibility mode can be enabled by passing `ghecCompatibilityMode: true` to the `endpoints()` or `endpoint()` query.\n\n```graphql\n{\n  endpoints(ghecCompatibilityMode: true) {\n    name\n    method\n    url\n    parameters {\n      name\n      type\n    }\n  }\n}\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fgithub-openapi-graphql-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Fgithub-openapi-graphql-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fgithub-openapi-graphql-query/lists"}