$ show octokit/graphql-schema
This is an npm library that provides the GitHub GraphQL schema in JSON and IDL formats, along with a validation function and TypeScript type definitions. It is used by other Octokit libraries to validate GraphQL queries against the official GitHub GraphQL API. The schema is automatically updated hourly via a GitHub Action that fetches the latest schema from GitHub and creates pull requests for changes. The library is simple but robust, relying on the `graphql` package for validation and `graphql-codegen` for TypeScript types. It is not a data research project; it is a straightforward software library.
The LLM identified 1 files worth highlighting for reuse:
Exports a `validate` function that uses the `graphql` library to build a client schema from a JSON schema file and validate GraphQL queries. This pattern is reusable for any project that needs to validate GraphQL queries against a known schema. The function is self-contained, uses lazy schema loading, and returns standard GraphQLError objects. It demonstrates clean separation of concerns and could be extracted to validate queries against any GraphQL schema.