Repository navigation
graphql: fill remaining Issue fields and assignees pageInfo - #128
Merged
Merged
Conversation
Issue now serves databaseId, activeLockReason, isPinned, and
viewerCanUpdate, and reactionGroups reads the stored reaction rollup
instead of always returning an empty list, so the GraphQL counts agree
with REST reactions. The author can update their own issue and anyone
with push or higher can update any issue; everyone else cannot.
UserConnection gained pageInfo, so an assignees expansion that selects
pageInfo { hasNextPage endCursor } resolves instead of rejecting; every
construction site fills it.
bodyHTML/bodyText, timelineItems, and project-card data stay out of
scope: the first needs the markup renderer wired into the GraphQL deps
plus a markdown-to-text pass, the timeline its own subsystem, and
classic projects are not modeled (the connection stays a faithful empty
stub).
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.
Implements the data-backed subset of review item R02-16 (P2, spec 2001/review/02).
What
Issuenow servesdatabaseId,activeLockReason(mapped onto theLockReasonenum from the stored reason),isPinned, andviewerCanUpdate.Issue.reactionGroupsnow reads the stored reaction rollup (gqlReactionGroups(iss.Reactions)) instead of hardcoding an empty list, so GraphQL counts agree with REST reactions.UserConnectiongainedpageInfo: PageInfo!; every construction site fills it, so an assignees expansion selectingpageInforesolves instead of rejecting.Tests
api/graphql/issue_fields_contract_test.go—TestIssueRemainderFields: databaseId is a positive db id, activeLockReason is null on an unlocked issue, isPinned false, viewerCanUpdate true for the owner/author, reactionGroups a non-null array, assignees carries pageInfo.Full
go test ./...green (one unrelated flaky FE timing test,TestPageSLO/repo_tree, passes on re-run).Deferred (documented in the commit + spec)
bodyHTML/bodyTextneed the markup renderer wired into the GraphQL deps plus a markdown-to-text pass;timelineItemsis its own subsystem; classicprojectCardsdata stays a faithful empty stub since Githome does not model classic projects.isPinnedis always false until issue pinning is modeled.