codeintel: make usage-range non-optional (#64236)

Closes
https://linear.app/sourcegraph/issue/GRAPH-727/make-range-for-usagerange-non-optional

## Test plan

Tests continue to pass
This commit is contained in:
Christoph Hegemann 2024-08-02 16:51:57 +02:00 committed by GitHub
parent 4a565a8819
commit 7fc92a5538
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -746,7 +746,7 @@ type Usage {
# Invariant: `range.path` == `blob.path`. The path is made available
# as part of this type for convenience.
# """
usageRange: UsageRange
usageRange: UsageRange!
# TODO: Add a blob: GitBlob field here for more flexibility?

View File

@ -179,8 +179,8 @@ func (u *usageResolver) DataSource() *string {
panic("implement me")
}
func (u *usageResolver) UsageRange(ctx context.Context) (resolverstubs.UsageRangeResolver, error) {
return u.usageRange, nil
func (u *usageResolver) UsageRange(ctx context.Context) resolverstubs.UsageRangeResolver {
return u.usageRange
}
func (u *usageResolver) SurroundingContent(ctx context.Context) string {

View File

@ -533,7 +533,7 @@ type UsageResolver interface {
Symbol(context.Context) (SymbolInformationResolver, error)
Provenance(context.Context) (codenav.CodeGraphDataProvenance, error)
DataSource() *string
UsageRange(context.Context) (UsageRangeResolver, error)
UsageRange(context.Context) UsageRangeResolver
SurroundingContent(_ context.Context) string
UsageKind() SymbolUsageKind
}