pub const SEARCH_ISSUES: &str = "query($search:String!,$type:SearchType!,$first:Int!,$after:String,$nestedFirst:Int!,$boardItems:Int!,$duplicates:Boolean!){\n search(query:$search,type:$type,first:$first,after:$after){\n pageInfo{hasNextPage endCursor}\n nodes{__typename ...BoardIssue}\n }\n } fragment BoardIssue on Issue{__typename id title body url createdAt updatedAt state stateReason(enableDuplicate:$duplicates) repository{nameWithOwner} parent{id} subIssuesSummary{total}\n labels(first:$nestedFirst){nodes{id name color}pageInfo{hasNextPage}}\n projectItems(first:$boardItems){nodes{id project{number}\n 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}}}pageInfo{hasNextPage endCursor}}}";Expand description
Every issue of one board, found by a search scoped to that board.
This is how the projects a board holds are listed, and it selects no items
connection on ProjectV2: the board is a qualifier of the search rather than a
container walked page by page, so nothing nested inside a board item is paid for.
Which of the issues it returns is a project is then read off parent — GitHub
accepts -has:parent as a search qualifier and silently ignores it, so the
discriminator has to be applied to the field, which is a scalar on the issue and
costs nothing.