File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
packages/graphql-language-service/src Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ export function getAutocompleteSuggestions(
148148 schema ,
149149 contextToken ,
150150 options ,
151+ 1 ,
151152 ) ;
152153 if ( ! context ) {
153154 return [ ] ;
Original file line number Diff line number Diff line change @@ -175,15 +175,16 @@ export function getContextAtPosition(
175175 cursor : IPosition ,
176176 schema : GraphQLSchema ,
177177 contextToken ?: ContextToken ,
178- options ?: { mode ?: GraphQLDocumentMode ; uri ?: string } ,
178+ options ?: { mode ?: GraphQLDocumentMode ; uri ?: string ; offset ?: number } ,
179+ offset = 0 ,
179180) : {
180181 token : ContextToken ;
181182 state : State ;
182183 typeInfo : ReturnType < typeof getTypeInfo > ;
183184 mode : GraphQLDocumentMode ;
184185} | null {
185186 const token : ContextToken =
186- contextToken || getTokenAtPosition ( queryText , cursor , 0 ) ;
187+ contextToken || getTokenAtPosition ( queryText , cursor , offset ) ;
187188 if ( ! token ) {
188189 return null ;
189190 }
You can’t perform that action at this time.
0 commit comments