Skip to main content

Module github_graphql

Module github_graphql 

Source
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§

RepoDiscovery
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.