Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
docs: Specify matching behavior for usagesForSymbol(range:) (#64151)
Browse files Browse the repository at this point in the history
Noticed a TODO in the GraphQL schema docs, so figured I'd fill that out.
  • Loading branch information
varungandhi-src authored Jul 31, 2024
1 parent 43b4341 commit d17660d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cmd/frontend/graphqlbackend/codeintel.codenav.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,19 @@ extend type Query {

"""
Information about an existing source range for a usage of the symbol.
TODO: Specify behavior for various cases of overlap between LookupRange
and actual occurrence range.
The range must match the underlying occurrence exactly. For example,
if there is code like:
callMyFunction()
# ^^ (1)
# ^^ (2)
# ^^^^^^^^^^^^^^ (3)
# ^^^^^^^^^^^^^^^^^^^^ (4)
Only using the range (3) will return correct results. If the range was
obtained from an 'occurrence' in the CodeGraphData.occurrences API,
then the same range should be used here.
"""
range: RangeInput!

Expand Down

0 comments on commit d17660d

Please sign in to comment.