A minimal (1.5kB minified) library to query GitHub's REST API OpenAPI specification using GraphQL. Current version 5.2.1 (stable, low release cadence). Provides a single `graphql()` function that fetches the latest or specific versions of `@github/openapi` releases. Key differentiator: bridges GraphQL queries with REST API metadata, enabling filtered introspection of endpoints, parameters, and releases. Supports GitHub Enterprise Cloud (GHEC) compatibility mode via `ghecCompatibilityMode` flag. Requires Node >= 18.
npm install github-openapi-graphql-queryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing the default export and querying endpoints with a specific version parameter, handling response and errors.
Upgrade Node to 18 or later. Use an older version (4.x) if stuck on older Node.
Use default import: `import graphql from 'github-openapi-graphql-query'`.
Use a declaration file (`declare module 'github-openapi-graphql-query'`) or suppress with `// @ts-ignore`.
Always specify a version in queries if you need deterministic results, or expect slower repeated queries.
Run `npm install github-openapi-graphql-query` and verify the package name in the import statement.
Change to `import graphql from 'github-openapi-graphql-query'`.
Add a `declarations.d.ts` file with `declare module 'github-openapi-graphql-query';`.
No dependency data recorded yet.