File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,12 @@ export interface IMetadata extends OctokitCommon.ReposGetResponseData {
122122 currentUser : any ;
123123}
124124
125+ interface GraphQLError {
126+ extensions : {
127+ code : string ;
128+ } ;
129+ }
130+
125131export class GitHubRepository implements vscode . Disposable {
126132 static ID = 'GitHubRepository' ;
127133 protected _initialized : boolean = false ;
@@ -249,7 +255,7 @@ export class GitHubRepository implements vscode.Disposable {
249255 return this . query ( query , ignoreSamlErrors ) ;
250256 }
251257
252- if ( e . graphQLErrors && e . graphQLErrors . length && ( e . graphQLErrors [ 0 ] . extensions && e . graphQLErrors [ 0 ] . extensions . code === 'undefinedField' ) && ! this . _areQueriesLimited ) {
258+ if ( e . graphQLErrors && e . graphQLErrors . length && ( ( e . graphQLErrors as GraphQLError [ ] ) . some ( error => error . extensions . code === 'undefinedField' ) ) && ! this . _areQueriesLimited ) {
253259 // We're running against a GitHub server that doesn't support the query we're trying to run.
254260 // Switch to the limited schema and try again.
255261 this . _areQueriesLimited = true ;
You can’t perform that action at this time.
0 commit comments