graphqlbackend: Proper lazy loading in GitCommitResolver
Created by: tsenart
This fixes a bug I introduced in #15746 where not all fields of the commit would be lazy loaded.
It makes the constructor of the resolver take in a commit ID and a commit, separately, so that it's clear when we instantiate a resolver with a pre-loaded commit, vs without one (so that it gets lazy loaded).
Merge request reports
Activity
Created by: sourcegraph-bot
Notifying subscribers in CODENOTIFY files for diff e49a57f0e29e402a6b121bce0c36423e9e529032...8136a21b24bb900519c75607cc65f6c6139bd23a.
Notify File(s) @keegancsmith cmd/frontend/graphqlbackend/search_commits.go
cmd/frontend/graphqlbackend/search_commits_test.go
cmd/frontend/graphqlbackend/search_results.go
cmd/frontend/graphqlbackend/search_symbols_test.goCreated by: codecov[bot]
Codecov Report
Merging #15752 (8136a21) into main (d9e4345) will increase coverage by
0.01%
. The diff coverage is52.83%
.@@ Coverage Diff @@ ## main #15752 +/- ## ========================================== + Coverage 52.36% 52.37% +0.01% ========================================== Files 1633 1633 Lines 81536 81537 +1 Branches 7147 7147 ========================================== + Hits 42693 42707 +14 + Misses 35045 35022 -23 - Partials 3798 3808 +10
Flag Coverage Δ *Carryforward flag go 52.33% <52.83%> (+0.02%)
integration 28.36% <ø> (ø)
Carriedforward from d9e4345 storybook 27.35% <ø> (ø)
Carriedforward from d9e4345 typescript 52.47% <ø> (ø)
Carriedforward from d9e4345 unit 34.94% <ø> (ø)
Carriedforward from d9e4345 *This pull request uses carry forward flags. Click here to find out more.
Impacted Files Coverage Δ cmd/frontend/graphqlbackend/hunk.go 0.00% <0.00%> (ø)
cmd/frontend/graphqlbackend/search_results.go 55.40% <0.00%> (ø)
...d/frontend/graphqlbackend/repository_comparison.go 72.24% <50.00%> (ø)
cmd/frontend/graphqlbackend/search_commits.go 42.28% <50.00%> (ø)
cmd/frontend/graphqlbackend/git_commit.go 32.90% <53.33%> (+10.17%)
cmd/frontend/graphqlbackend/git_commits.go 48.97% <100.00%> (ø)
cmd/frontend/graphqlbackend/repository.go 18.56% <100.00%> (ø)
cmd/frontend/graphqlbackend/signature.go 63.63% <0.00%> (-18.19%)
Please register or sign in to reply