---
title: "GitHub API Request Limit: REST Polling vs GraphQL Batching at 5,000/Hour"
site: "dotinc.app"
kind: "article"
author: "Priya Nandakumar"
date: "December 2, 2026"
canonical: "https://dotinc.app/blog/github-api-request-limit-rest-polling-vs-graphql-batching-at-5000hour.php"
markdown: "https://dotinc.app/blog/github-api-request-limit-rest-polling-vs-graphql-batching-at-5000hour.php/index.md"
description: "At 5,000 requests per hour, GraphQL batching beats REST polling only when its quota delta per accepted update stays lower across the full traffic cycle."
---

# GitHub API Request Limit: REST Polling vs GraphQL Batching at 5,000/Hour

Priya Nandakumar · December 2, 2026

> At 5,000 requests per hour, GraphQL batching beats REST polling only when its quota delta per accepted update stays lower across the full traffic cycle.

At a 5,000-request/hour GitHub API budget, GraphQL batching outperforms REST polling only when it produces a lower quota delta per accepted update.

That advantage reverses if retries, cache hits, or the absence of a 20% margin eliminate GraphQL batching's measured lead over a full traffic cycle.

![GitHub API Request Limit](https://static.mm-ais.com/article-images-ai/github-api-request-limit-rest-polling-vs-ai-60faa2fb.jpg)

## How quota cost per update actually works

Quota delta per accepted update is the only comparison unit for this decision: it is the quota consumed by one arm during a fixed traffic window divided by the number of updates that arm actually accepted in that same window. Raw request count is not the denominator, because a request can return no useful change, be retried, or be served from cache.

To measure it, record the remaining quota for each arm immediately before the window starts and immediately after it ends, then subtract to get the delta. Divide that delta by accepted updates counted from application state, not by HTTP requests. Run both arms over one full traffic cycle so burst shape, cache warmth, and retry behavior are represented in the same measurement.

Read three sources in the same window: REST response rate-limit fields, the GraphQL rateLimit object, and your gateway access log. Treat them as cross-checks, not substitutes. If one source lacks a field, mark it "verify in docs" and do not infer its value from another source or from the request count.

The myth to kill is that the hourly request cap equals useful updates. The cap counts requests; the killer number is effective cost per accepted update. A lower request count can still lose if retries, partial responses, or cache misses consume more quota per accepted change.

An accepted update is a state change your application records as useful, not a response that merely arrives. Count it once per state change, even if multiple requests, retries, or cache layers participate in producing it.

Keep the measurement arm-specific and window-specific. Do not mix a REST delta from one hour with a GraphQL accepted-update count from another, and do not replace missing quota fields with assumptions. The comparison is valid only when both numerator and denominator come from the same fixed window and the same definition of an accepted update. If the two arms use different update definitions, normalize the definition first; otherwise the delta comparison is meaningless.

![How quota cost per update actually works — GitHub API Request Limit](https://static.mm-ais.com/article-images-ai/github-api-request-limit-rest-polling-vs-ai-8839fe62.jpg)

## Evidence to collect before you switch

Collect the three traces over one full traffic cycle before changing arms. Record each source at cycle start and cycle end, using the same window for REST and GraphQL, and keep the comparison at the stated 5,000-request/hour budget. Treat documentation as a claim to verify, not as a measured value, and store the raw capture with the computed result.

For Source 1, read GitHub's REST rate-limit documentation and record the current limit, the reset window, and whether pagination multiplies calls. If the page presents only a headline cap, verify it against observed response headers or gateway counts and note any mismatch instead of copying the headline. Record the exact field name read so a later documentation revision can be compared.

For Source 2, read GitHub's GraphQL rate-limit documentation and record the cost field and the remaining field if they are exposed; if either is absent, mark it not exposed rather than inferring a value. For Source 3, read your gateway access log and record accepted updates and retries per hour for each arm, including cache hits if the log records them. Keep retry and cache lines separate from accepted updates.

| Source | Field read | Before | After | Delta | Accepted updates |
| --- | --- | --- | --- | --- | --- |
| GitHub REST rate-limit docs | current limit, reset window, pagination multiplier | cycle-start value | cycle-end value | end minus start | n/a |
| GitHub GraphQL rate-limit docs | cost, remaining (if exposed) | cycle-start value | cycle-end value | end minus start | n/a |
| Gateway access log | accepted updates, retries per hour | cycle-start count | cycle-end count | end minus start | recorded count |

Work the three rows with the article's own illustrative numbers: if the gateway log shows REST consuming 120 quota units over the cycle with 120 accepted updates, the REST delta per accepted update is 1.0; if GraphQL consumes 144 quota units (4 batches × 30 quota × 1.2 retry multiplier) with the same accepted-update count, its delta is higher. Keep the REST and GraphQL rows separate so a documentation change cannot be mistaken for a traffic change, and recompute if any field is revised during the cycle.

Build the conditional winner table from the same traces: list each arm, its delta p after retry amplification, and whether the advantage survives the 20% margin. Record the winner only when the lower value remains lower after both adjustments; otherwise record REST polling as the retained arm. Include the retry count that caused any reversal.

Pass the completed traces, deltas, and winner record to the decision rules. Do not switch on raw request counts, unverified caps, or a single source; the switch requires the lower measured delta p to survive retries, cache effects, and the margin. Archive the table with the change request.

![Evidence to collect before you switch — GitHub API Request Limit](https://static.mm-ais.com/article-images-pixabay/github-api-request-limit-rest-polling-vs-a6d29fcd.png)

## Costs, retries, and cache math

Effective quota cost = (remaining_before − remaining_after) × (1 + retry_rate) ÷ accepted_updates. Read remaining_before and remaining_after from the same gateway log at cycle boundaries, and derive retry_rate from that same log rather than vendor claims. The retry multiplier accounts for quota consumed by failed or repeated attempts; reconcile any separately logged retries before dividing so the numerator and denominator describe the same traffic.

Polling amplification = polls_per_hour × pages_per_poll × (1 + retry_rate). When pages_per_poll is greater than one, REST cost scales with pagination and must be measured from fetched pages per poll, not assumed. Use the same gateway-log retry_rate for both arms so the retry term has one definition across the comparison.

Cache-adjusted polls = polls_per_hour × (1 − cache_hit_rate). Credit a cache reduction only after verifying cache freshness against your update SLA; a hit older than the SLA does not count as an accepted update and must be treated as a miss in the formula. If freshness cannot be verified, set cache_hit_rate to zero and measure uncached polling.

Apply each formula to the same full traffic cycle, with the same window and budget for both arms. Keep retry and cache terms explicit in the recorded result so a later review can see whether the advantage came from lower base cost, fewer retries, or a cache credit that passed the freshness check.

Do not replace these terms with a raw request total. The formulas are the cost inputs for the comparison, and each variable should be traceable to the gateway log or to a measured poll count.

| Metric | Formula | Verification |
| --- | --- | --- |
| Effective quota cost | (remaining_before − remaining_after) × (1 + retry_rate) ÷ accepted_updates | Same gateway log; retry_rate from log |
| Polling amplification | polls_per_hour × pages_per_poll × (1 + retry_rate) | Measured pages per poll |
| Cache-adjusted polls | polls_per_hour × (1 − cache_hit_rate) | Freshness checked against update SLA |

![GitHub API Request Limit, photo 2](https://static.mm-ais.com/article-images-pixabay/github-api-request-limit-rest-polling-vs-0bda383e.jpg)

## Limits and a worked 5,000/hour example

This section is the boundary check for the rule: it lists where the comparison can fail and gives one illustrative arithmetic example. It is not a measurement from any platform, and it does not replace the traces, formulas, or thresholds defined in the other sections.

| Edge case | Effect on the rule | Check before trusting the result |
| --- | --- | --- |
| Bursty events | Breaks if one batch window exceeds the freshness SLA | Measure maximum event age inside each batch window |
| Shared token | Breaks if another client consumes quota | Attribute quota by client or token owner |
| GraphQL cost drift | Breaks if identical payloads show unstable cost variance | Repeat identical batches and compare cost |
| Paginated REST | Still wins if measured delta per accepted update stays lower | Include every page and accepted update in the same window |

Worked example, illustrative only and not a GitHub measurement: confirm the 5,000-request/hour budget first. REST: 120 polls/hour × 1 page × 1.0 retry = 120 quota. GraphQL: 4 batches/hour × 30 quota/batch × 1.2 retry = 144 quota. In this illustration REST is lower by 24 quota/hour, so GraphQL would need to reach 96 quota/hour or less, a 20% margin below 120, before a switch is justified. The 5,000/hour headline budget is only the ceiling for the test; it is not evidence that either arm fits.

Checklist artifact: (1) verify the actual hourly budget before using the 5,000/hour figure; (2) run both arms over one full traffic cycle; (3) count retries and cache hits in the same window; (4) compare quota delta per accepted update, not raw requests; (5) require the GraphQL result to stay at least 20% lower after retry amplification; (6) discard or rerun the comparison if burstiness, shared-token contention, or GraphQL cost drift appears.

If any edge case invalidates the measurement, treat the comparison as unverified and keep the current arm until a clean cycle is available. A single clean cycle is the minimum evidence; repeated cycles are better when cost drift is suspected.

## Decision rules that settle REST vs GraphQL

At a 5,000-request/hour budget, the choice between REST polling and GraphQL batching is settled by five if/then thresholds that operationalize the canonical rule. Treat each threshold as a gate: validate the measurement conditions first, then make the switch decision only when the observed advantage is durable enough to clear the required margin.

| Gate | If | Then |
| --- | --- | --- |
| Switch margin | Measured GraphQL delta per accepted update is 10% on either arm | Fix retries before comparing |
| Query cost stability | GraphQL query cost varies >30% across identical payloads | Do not switch until stabilized |
| Token isolation | A shared token has other consumers | Measure per-client delta or treat the rule as invalid |
| Cache evidence | Cache hit rate is unverified | Count it as 0% in the comparison |

The 80% cutoff is the decision threshold, not a target to approximate. It enforces a 20% margin, so a narrow GraphQL advantage does not trigger a migration that ordinary operating variance can erase. Evaluate this threshold only after the other gates pass, because retry noise, unstable query cost, or missing cache evidence can produce a misleading sub-80% result.

The retry and query-cost gates prevent unstable measurements from driving the decision. A retry rate above 10% on either arm means failure handling is still shaping the observed delta, so the comparison should pause until retries are fixed. A GraphQL query cost that varies by more than 30% across identical payloads signals an unstabilized cost profile; in that state, keep REST polling and defer the switch until identical payloads produce consistent cost.

The isolation and cache gates prevent unattributed or assumed savings from counting as evidence. When a shared token serves other consumers, per-client measurement is required because aggregate quota movement cannot be assigned to the arm under test; without that isolation, the comparison rule is invalid. When cache hit rate is unverified, counting it as 0% keeps the comparison conservative and prevents an assumed cache benefit from deciding the outcome. Any failed gate keeps REST polling in place until the condition is corrected and the comparison is rerun under the same 5,000-request/hour budget.

## Frequently Asked Questions

**When does GraphQL batching outperform REST polling under the 5,000-request/hour budget?**

It outperforms REST polling only when it produces a lower quota delta per accepted update.

**What can erase GraphQL batching's measured lead over a full traffic cycle?**

Retries, cache hits, or the absence of a 20% margin can eliminate that lead.

**Why can't raw request count serve as the denominator for quota cost per update?**

A request can return no useful change, be retried, or be served from cache.

**How should quota delta be measured across a traffic cycle?**

Record the remaining quota for each arm immediately before the window starts and immediately after it ends, and run both arms over one full traffic cycle so burst shape, cache warmth, and retry behavior are represented.

**What count should divide the quota delta to get quota cost per accepted update?**

Accepted updates counted from application state, not HTTP requests.

**How should the three rate-limit sources be treated during measurement?**

REST response rate-limit fields, the GraphQL rateLimit object, and the gateway access log are cross-checks, not substitutes, and a missing field should be marked "verify in docs" rather than inferred.

## Quick answers

| When does GraphQL batching outperform REST polling at a 5,000-request/hour GitHub API budget? | At a 5,000-request/hour GitHub API budget, GraphQL batching outperforms REST polling only when it produces a lower quota delta per accepted update. |
| --- | --- |
| What is the only comparison unit for deciding between REST polling and GraphQL batching? | Quota delta per accepted update is the only comparison unit for this decision: it is the quota consumed by one arm during a fixed traffic window divided by the number of updates that arm actually accepted in that same window. |
| Why is raw request count not the denominator for this comparison? | Raw request count is not the denominator, because a request can return no useful change, be retried, or be served from cache. |
| How should quota delta per accepted update be measured? | To measure it, record the remaining quota for each arm immediately before the window starts and immediately after it ends, then subtract to get the delta, then divide that delta by accepted updates counted from application state, not by HTTP requests. |
| Which three sources should be read in the same window for cross-checking? | Read three sources in the same window: REST response rate-limit fields, the GraphQL rateLimit object, and your gateway access log. |

Also worth reading: **2026 Case Study: Dependency Graph Cuts Ops Coordination 23%**: [2026 Case Study: Dependency Graph](https://dotinc.app/blog/2026-case-study-dependency-graph-cuts-ops-coordination-23.php) · **Shorten Product Release Time: Dependency Variance Threshold 0—Split vs. Hold**: [Shorten Product Release Time: Dependency](https://dotinc.app/blog/shorten-product-release-time-dependency-variance-threshold-0split-vs-hold.php) · **Orchestration vs Automation: Dependency Resolution and Validation**: [Orchestration vs Automation: Dependency Resolution](https://dotinc.app/blog/orchestration-vs-automation-dependency-resolution-and-validation.php)

### Related reading

- [Can 15-minute polling meet a 30-minute SLA? Measure p95 before committing](https://dotinc.app/blog/can-15-minute-polling-meet-a-30-minute-sla-measure-p95-before-committing.php)
- [Product ops handoffs: 30-day pilot to measure rework per automation, then automate or skip](https://dotinc.app/blog/product-ops-handoffs-30-day-pilot-to-measure-rework-per-automation-then-automate-or-skip.php)
- [Machine learning deployment approvals: map staging-to-production gates, track 15% rollback shift](https://dotinc.app/blog/machine-learning-deployment-approvals-map-staging-to-production-gates-track-15-rollback-shift.php)
- [Shared state boards vs automation runbooks: a verify-first handoff latency guide](https://dotinc.app/blog/shared-state-boards-vs-automation-runbooks-a-verify-first-handoff-latency-guide.php)
- [Json output for command line tools: 42% fewer parse errors, keep the flag](https://dotinc.app/blog/json-output-for-command-line-tools-42-fewer-parse-errors-keep-the-flag.php)
- [Human approval gates: test median wait and override drop before adding](https://dotinc.app/blog/human-approval-gates-test-median-wait-and-override-drop-before-adding.php)

### Latest

- [Product ops handoffs: 30-day pilot to measure rework per automation, then...](https://dotinc.app/blog/product-ops-handoffs-30-day-pilot-to-measure-rework-per-automation-then-automate-or-skip.php)
- [Machine learning deployment approvals: map staging-to-production gates, track...](https://dotinc.app/blog/machine-learning-deployment-approvals-map-staging-to-production-gates-track-15-rollback-shift.php)
- [Can 15-minute polling meet a 30-minute SLA? Measure p95 before committing](https://dotinc.app/blog/can-15-minute-polling-meet-a-30-minute-sla-measure-p95-before-committing.php)

Canonical: https://dotinc.app/blog/github-api-request-limit-rest-polling-vs-graphql-batching-at-5000hour.php
Markdown: https://dotinc.app/blog/github-api-request-limit-rest-polling-vs-graphql-batching-at-5000hour.php/index.md

```json
{"@context":"https://schema.org","@type":"BlogPosting","headline":"GitHub API Request Limit: REST Polling vs GraphQL Batching at 5,000/Hour","url":"https://dotinc.app/blog/github-api-request-limit-rest-polling-vs-graphql-batching-at-5000hour.php","description":"At 5,000 requests per hour, GraphQL batching beats REST polling only when its quota delta per accepted update stays lower across the full traffic cycle.","datePublished":"December 2, 2026","author":{"@type":"Person","name":"Priya Nandakumar"},"articleBody":"At a 5,000-request/hour GitHub API budget, GraphQL batching outperforms REST polling only when it produces a lower quota delta per accepted update. That advantage reverses if retries, cache hits, or the absence of a 20% margin eliminate GraphQL batching's measured lead over a full traffic cycle. ![GitHub API Request Limit](https://static.mm-ais.com/article-images-ai/github-api-request-limit-rest-polling-vs-ai-60faa2fb.jpg) ## How quota cost per update actually works Quota ..."}
```
