Skip to content

search: query DB for repo name in repository resolvers

Administrator requested to merge k/display-limit-3 into main

Created by: keegancsmith

Currently Stats.Repos does not store the full universe of resolved repositories. So filtering against it for timedout/etc repo names is incorrect. Additionally, we want to move away from Stats.Repos requiring the repository name.

This commit updates the GraphQL resolvers to instead query the database for repository names if any of the search result repository fields are called.

Additionally we consolidate the two implementations for creating resolvers to prevent too much duplication. We now signal use of the Repos map by passing in the mask 0.

Note: We only query for minimal repos, not the full metadata. Most uses of these resolvers likely only ask for names, so we avoid needing to look up the rest of the data unless the query asks for it.

Part of #27421 (closed)

Merge request reports

Loading