Add fileContent query and issue comment reading to GraphQL API - #2
Merged
Conversation
Repository.tree() only ever returned metadata (name/path/size/oid); there was no way to fetch a file's actual bytes even though RepoManager already had read_file_at_ref internally (used only for the workflow-dispatch YAML read). Added Repository.fileContent(ref, path), capped at 10MiB, returning UTF-8 text plus always-present base64 for binary files. commentOnIssue wrote to issue_comments and handed back the created row, but nothing read the table back afterwards. Added Issue.comments. Bumped rustc 1.94->1.97 (hiqlite 0.14 requires it).
Athenox14
added a commit
that referenced
this pull request
Jul 23, 2026
Add fileContent query and issue comment reading to GraphQL API
Athenox14
added a commit
that referenced
this pull request
Jul 23, 2026
Add fileContent query and issue comment reading to GraphQL API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two real gaps in the GraphQL API, confirmed by reading the code (not assumed):
Repository.tree(ref, path)only ever returned tree metadata (name/path/size/oid).RepoManager::read_file_at_refalready existed ingit-corebut was only called internally (reading a workflow YAML fortriggerWorkflowDispatch) — nothing exposed it via GraphQL. AddedRepository.fileContent(ref, path), returning aFileContentObjectwith UTF-8content(when the file isn't binary), an always-presentcontentBase64,isBinary, andsize. Returnsnullfor a missing path/ref or a file over 10MiB (a cost guard, not a silent truncation).commentOnIssueinserted intoissue_commentsand handed back the row it just created, but nothing ever read that table again —IssueObjectonly exposedlabels/milestone. AddedIssue.comments, ordered oldest-first, following the samequery_aspattern already used forlabels.Also bumped the local toolchain
rustc1.94 → 1.97 (hiqlite0.14 requires ≥1.95; already documented as a recurring requirement in a prior journal entry).Test plan
cargo check --workspace— cleancargo test --workspace— in progress locally; CI on this PR will confirmDOC.md§4 updated with the newrepository/issuenested-field sectionsJOURNAL.mdupdated with the investigation + fixGenerated by Claude Code