Skip to main content

CLOSED_ITEMS

Constant CLOSED_ITEMS 

Source
pub const CLOSED_ITEMS: &str = "query($owner:String!,$number:Int!,$first:Int!,$after:String,$filter:String!,$nestedFirst:Int!,$duplicates:Boolean!,$relationshipEvents:[IssueTimelineItemsItemType!]=[BLOCKED_BY_ADDED_EVENT,BLOCKED_BY_REMOVED_EVENT,BLOCKING_ADDED_EVENT,BLOCKING_REMOVED_EVENT,PARENT_ISSUE_ADDED_EVENT,PARENT_ISSUE_REMOVED_EVENT]){\n      closedItems:repositoryOwner(login:$owner){\n        ... on ProjectV2Owner{projectV2(number:$number){id\n          fields(first:$nestedFirst){nodes{\n            ... on ProjectV2SingleSelectField{__typename id name options{id name}}\n            ... on ProjectV2Field{__typename id name dataType}\n          }pageInfo{hasNextPage}}\n          items(first:$first,after:$after,query:$filter){nodes{id updatedAt fieldValues(first:$nestedFirst){nodes{\n          ... on ProjectV2ItemFieldSingleSelectValue{name field{\n            ... on ProjectV2SingleSelectField{id name options{id name}}\n          }}\n          ... on ProjectV2ItemFieldTextValue{text field{... on ProjectV2Field{id name}}}\n        }pageInfo{hasNextPage}} content{\n        ... on Issue{__typename id number title body url createdAt updatedAt state stateReason(enableDuplicate:$duplicates) repository{nameWithOwner} parent{id} subIssuesSummary{total} commentCount:comments{totalCount} relationshipEvents:timelineItems(itemTypes:$relationshipEvents){totalCount} labels(first:$nestedFirst){nodes{id name color}pageInfo{hasNextPage}}}\n        ... on PullRequest{__typename id}\n        ... on DraftIssue{__typename id title body createdAt updatedAt}\n      }} pageInfo{hasNextPage endCursor}}\n        }}\n      }\n    }";
Expand description

Every closed item of the board, by the board’s own field filter — what task status reconcile reads, and nothing else of the board.

ProjectV2.items(query:) narrowed by $filter, which this source binds to is:closed alone, so a board whose open items are most of it is not read whole to find the closed ones. It is narrowed rather than trusted: every item it answers is confirmed closed, with a reason and a card that contradict each other, from the item node it already carries, so a filter that also let open items through would cost reads and write nothing wrong.

The board’s own id and field definitions ride along, as BOARD carries them, so the option writes that follow need no read of the board. The root is aliased closedItems rather than owner, so nothing counting the board’s own whole reads counts this one among them.