@@ -263,7 +263,7 @@ interface GraphQLIssueSearchResponse {
263263 pageInfo : { hasNextPage : boolean ; endCursor : string | null } ;
264264 nodes : ( GraphQLIssueNode | null ) [ ] ;
265265 } ;
266- rateLimit ?: { remaining : number ; resetAt : string } ;
266+ rateLimit ?: { limit : number ; remaining : number ; resetAt : string } ;
267267}
268268
269269interface GraphQLPRNode {
@@ -310,7 +310,7 @@ interface GraphQLPRSearchResponse {
310310 pageInfo : { hasNextPage : boolean ; endCursor : string | null } ;
311311 nodes : ( GraphQLPRNode | null ) [ ] ;
312312 } ;
313- rateLimit ?: { remaining : number ; resetAt : string } ;
313+ rateLimit ?: { limit : number ; remaining : number ; resetAt : string } ;
314314}
315315
316316interface ForkCandidate {
@@ -325,8 +325,8 @@ interface ForkRepoResult {
325325}
326326
327327interface ForkQueryResponse {
328- rateLimit ?: { remaining : number ; resetAt : string } ;
329- [ key : string ] : ForkRepoResult | { remaining : number ; resetAt : string } | undefined | null ;
328+ rateLimit ?: { limit : number ; remaining : number ; resetAt : string } ;
329+ [ key : string ] : ForkRepoResult | { limit : number ; remaining : number ; resetAt : string } | undefined | null ;
330330}
331331
332332// ── GraphQL search query constants ───────────────────────────────────────────
@@ -353,7 +353,7 @@ const ISSUES_SEARCH_QUERY = `
353353 }
354354 }
355355 }
356- rateLimit { remaining resetAt }
356+ rateLimit { limit remaining resetAt }
357357 }
358358` ;
359359
@@ -406,7 +406,7 @@ const PR_SEARCH_QUERY = `
406406 }
407407 }
408408 }
409- rateLimit { remaining resetAt }
409+ rateLimit { limit remaining resetAt }
410410 }
411411` ;
412412
@@ -479,7 +479,7 @@ const LIGHT_COMBINED_SEARCH_QUERY = `
479479 }
480480 }
481481 }
482- rateLimit { remaining resetAt }
482+ rateLimit { limit remaining resetAt }
483483 }
484484 ${ LIGHT_PR_FRAGMENT }
485485` ;
@@ -496,7 +496,7 @@ const LIGHT_PR_SEARCH_QUERY = `
496496 }
497497 }
498498 }
499- rateLimit { remaining resetAt }
499+ rateLimit { limit remaining resetAt }
500500 }
501501 ${ LIGHT_PR_FRAGMENT }
502502` ;
@@ -507,7 +507,7 @@ interface LightPRSearchResponse {
507507 pageInfo : { hasNextPage : boolean ; endCursor : string | null } ;
508508 nodes : ( GraphQLLightPRNode | null ) [ ] ;
509509 } ;
510- rateLimit ?: { remaining : number ; resetAt : string } ;
510+ rateLimit ?: { limit : number ; remaining : number ; resetAt : string } ;
511511}
512512
513513/** Phase 2 backfill query: enriches PRs with heavy fields using node IDs. */
@@ -541,7 +541,7 @@ const HEAVY_PR_BACKFILL_QUERY = `
541541 }
542542 }
543543 }
544- rateLimit { remaining resetAt }
544+ rateLimit { limit remaining resetAt }
545545 }
546546` ;
547547
@@ -563,7 +563,7 @@ const HOT_PR_STATUS_QUERY = `
563563 }
564564 }
565565 }
566- rateLimit { remaining resetAt }
566+ rateLimit { limit remaining resetAt }
567567 }
568568` ;
569569
@@ -577,7 +577,7 @@ interface HotPRStatusNode {
577577
578578interface HotPRStatusResponse {
579579 nodes : ( HotPRStatusNode | null ) [ ] ;
580- rateLimit ?: { remaining : number ; resetAt : string } ;
580+ rateLimit ?: { limit : number ; remaining : number ; resetAt : string } ;
581581}
582582
583583interface GraphQLLightPRNode {
@@ -639,12 +639,12 @@ interface LightCombinedSearchResponse {
639639 pageInfo : { hasNextPage : boolean ; endCursor : string | null } ;
640640 nodes : ( GraphQLLightPRNode | null ) [ ] ;
641641 } ;
642- rateLimit ?: { remaining : number ; resetAt : string } ;
642+ rateLimit ?: { limit : number ; remaining : number ; resetAt : string } ;
643643}
644644
645645interface HeavyBackfillResponse {
646646 nodes : ( GraphQLHeavyPRNode | null ) [ ] ;
647- rateLimit ?: { remaining : number ; resetAt : string } ;
647+ rateLimit ?: { limit : number ; remaining : number ; resetAt : string } ;
648648}
649649
650650// Max node IDs per nodes() query (GitHub limit)
@@ -663,7 +663,7 @@ interface SearchPageResult<T> {
663663 * caller-provided `processNode` callback. Handles partial errors, cap enforcement,
664664 * and rate limit tracking. Returns the count of items added by processNode.
665665 */
666- async function paginateGraphQLSearch < TResponse extends { search : SearchPageResult < TNode > ; rateLimit ?: { remaining : number ; resetAt : string } } , TNode > (
666+ async function paginateGraphQLSearch < TResponse extends { search : SearchPageResult < TNode > ; rateLimit ?: { limit : number ; remaining : number ; resetAt : string } } , TNode > (
667667 octokit : GitHubOctokit ,
668668 query : string ,
669669 queryString : string ,
@@ -815,11 +815,11 @@ async function runForkPRFallback(
815815 ) ;
816816 }
817817
818- const forkQuery = `query(${ varDefs . join ( ", " ) } ) {\n${ fragments . join ( "\n" ) } \nrateLimit { remaining resetAt }\n}` ;
818+ const forkQuery = `query(${ varDefs . join ( ", " ) } ) {\n${ fragments . join ( "\n" ) } \nrateLimit { limit remaining resetAt }\n}` ;
819819
820820 try {
821821 const forkResponse = await octokit . graphql < ForkQueryResponse > ( forkQuery , variables ) ;
822- if ( forkResponse . rateLimit ) updateGraphqlRateLimit ( forkResponse . rateLimit as { remaining : number ; resetAt : string } ) ;
822+ if ( forkResponse . rateLimit ) updateGraphqlRateLimit ( forkResponse . rateLimit as { limit : number ; remaining : number ; resetAt : string } ) ;
823823
824824 for ( let i = 0 ; i < forkChunk . length ; i ++ ) {
825825 const data = forkResponse [ `fork${ i } ` ] as ForkRepoResult | null | undefined ;
@@ -1475,11 +1475,11 @@ async function graphqlSearchPRs(
14751475 ) ;
14761476 }
14771477
1478- const forkQuery = `query(${ varDefs . join ( ", " ) } ) {\n${ fragments . join ( "\n" ) } \nrateLimit { remaining resetAt }\n}` ;
1478+ const forkQuery = `query(${ varDefs . join ( ", " ) } ) {\n${ fragments . join ( "\n" ) } \nrateLimit { limit remaining resetAt }\n}` ;
14791479
14801480 try {
14811481 const forkResponse = await octokit . graphql < ForkQueryResponse > ( forkQuery , variables ) ;
1482- if ( forkResponse . rateLimit ) updateGraphqlRateLimit ( forkResponse . rateLimit as { remaining : number ; resetAt : string } ) ;
1482+ if ( forkResponse . rateLimit ) updateGraphqlRateLimit ( forkResponse . rateLimit as { limit : number ; remaining : number ; resetAt : string } ) ;
14831483
14841484 for ( let i = 0 ; i < forkChunk . length ; i ++ ) {
14851485 const data = forkResponse [ `fork${ i } ` ] as ForkRepoResult | null | undefined ;
0 commit comments