@@ -246,19 +246,6 @@ type GitBlobLSIFData implements TreeEntryLSIFData {
246
246
character : Int !
247
247
): Hover
248
248
249
- """
250
- Either one of 'symbol' or 'range' must be provided, but this isn't enforced at the GraphQL
251
- layer due to the lack of support for input unions.
252
- https://github.com/graphql/graphql-wg/blob/main/rfcs/InputUnion.md
253
- """
254
- usages (
255
- symbol : LookupSCIPSymbol ,
256
- range : LookupRange ,
257
- filter : UsagesFilter ,
258
- first : Int ,
259
- after : String ,
260
- ): UsageConnection !
261
-
262
249
"""
263
250
Code diagnostics provided through LSIF.
264
251
"""
@@ -275,6 +262,19 @@ type GitBlobLSIFData implements TreeEntryLSIFData {
275
262
snapshot (indexID : ID ! ): [SnapshotData ! ]
276
263
}
277
264
265
+ extend type Query {
266
+ usagesForSymbol (
267
+ symbol : LookupSCIPSymbol ,
268
+ """
269
+ Non-optional due to implementation limitations
270
+ """
271
+ range : LookupRange ! ,
272
+ filter : UsagesFilter ,
273
+ first : Int ,
274
+ after : String ,
275
+ ): UsageConnection !
276
+ }
277
+
278
278
input LookupSCIPSymbol {
279
279
name : SymbolNameComparator !
280
280
provenance : ProvenanceComparator !
@@ -297,8 +297,24 @@ type SCIPSymbol {
297
297
}
298
298
299
299
input LookupRange {
300
- start : LookupPosition !
301
- end : LookupPosition !
300
+ """
301
+ Defaults to instance-wide search if the repo is not specified.
302
+
303
+ This field is non-optional due to implementation limitations.
304
+ """
305
+ repo : String !
306
+ """
307
+ Defaults to HEAD of the default branch if not specified.
308
+ """
309
+ revision : String
310
+ """
311
+ Defaults to repo-wide search if the path is not specified.
312
+
313
+ This field is non-optional due to implementation limitations.
314
+ """
315
+ path : String !
316
+ start : LookupPosition
317
+ end : LookupPosition
302
318
}
303
319
304
320
input LookupPosition {
@@ -310,7 +326,6 @@ input UsagesFilter {
310
326
and : [UsagesFilter ! ]
311
327
or : [UsagesFilter ! ]
312
328
not : UsagesFilter
313
- # TODO: Can we be flexible here and allow patterns while still maintaining fast queries.
314
329
repository : RepositoryFilter
315
330
path : PathFilter
316
331
kind : SymbolUsageKind
0 commit comments