Expand description
GitHub GraphQL API client.
Consolidates multiple REST API calls into 1-2 GraphQL queries per crate:
- Releases + tags (for version detection)
- Repository tree (for license/runtime dep detection)
- File contents (Cargo.toml, workspace member Cargo.tomls)
The archive download for SHA256 computation still uses REST (no GraphQL equivalent).
Structs§
- Repo
Discovery - Result of the initial discovery query: releases, tags, tree, and root Cargo.toml.
Functions§
- best_
version_ tag - Pick the best version tag from discovery results. Compares release tags and ref tags, preferring the newer version.
- discover_
repo - Execute the discovery query: fetch releases, tags, recursive tree, and root Cargo.toml in a single GraphQL call.
- fetch_
files - Fetch multiple file contents in a single GraphQL query using aliases. Returns a Vec of (path, contents) pairs for files that exist.