pub const OPEN_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 openItems: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 open item of the board, drafts included, by the board’s own field filter — what a task listing whose every status category is open reads, and nothing else of the board.
ProjectV2.items(query:) narrowed by $filter, which this source binds to
is:open alone. GitHub’s filter reads the issue’s state, not its card, so it answers
every open issue whatever column its card sits in — an open issue under a terminal card,
and one under an option no mapping names, among them — and every draft, which has no
state and is never closed; measured on the real board by spike-store-defects, it read
466 open items in five requests where the whole board’s walk and its issue search took
thirty-one. Each item’s category is still confirmed in process from its own node, so a
filter that let a closed item through would cost a read and keep nothing it should not.
The board’s own id and field definitions ride along, as CLOSED_ITEMS carries them,
so a status write after it needs no read of the board’s fields. The root is aliased
openItems, so nothing counting the board’s whole reads counts this one among them.