pub const ORIGIN_LOOKUP: &str = "query($owner:String!,$number:Int!,$filter:String!,$search:String!,$type:SearchType!,$originFirst:Int!,$itemsAfter:String,$searchAfter:String,$nestedFirst:Int!,$boardItems:Int!,$duplicates:Boolean!){\n originItems:repositoryOwner(login:$owner){\n ... on ProjectV2Owner{projectV2(number:$number){\n items(first:$originFirst,after:$itemsAfter,query:$filter){nodes{id 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} 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 search(query:$search,type:$type,first:$originFirst,after:$searchAfter){\n pageInfo{hasNextPage endCursor}\n nodes{__typename ...BoardIssue}\n }\n } fragment BoardIssue on Issue{__typename id number 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{id 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 carrier of one copy origin, by two reads in one request, and nothing else of the board.
originItems is the board’s own items narrowed by its own field filter —
ProjectV2.items(query:), which GitHub’s schema declares as “Search query for
filtering items” — to those whose onetaskgraph.origin text field holds the
qualified id, quoted. It reads the field every carrier already holds, whichever release
wrote it, and matches it exactly: measured on 2026-09-29 against a 394-item board,
the quoted, the unquoted and the bare-value spellings each returned exactly the one
carrier and a prefix of the value returned none. It is ProjectV2.items, so it lags a
fresh addProjectV2ItemById the way that connection does.
search is the board-scoped issue search for the same id as a quoted phrase in
the body, which is where this source mirrors the origin into its metadata slot. GitHub
indexes that comment, and the index catches up with a write in a second or two rather
than in minutes, so it finds a carrier another process wrote that the first read is
still behind on.
Each connection pages at $originFirst, its own small size — see ORIGIN_PAGE_SIZE
— and resumes from its own cursor; a connection already walked to its end is resumed
from its last cursor, which answers an empty page. Every candidate either read returns
is confirmed against its own origin field before it is reported, so a token match of
the search or anything else the filter admits never is.
The root is aliased originItems rather than owner, so nothing counting the board’s
own whole reads counts this one among them.