Rate Limit Headers are missing the cost


I played around with the graphql API and found that useful feature that I can get the rate limit information about a query:

"rateLimit": {
    "cost": 1,
    "limit": 5000,
    "nodeCount": 100,
    "remaining": 4970,
    "resetAt": "2017-08-26T15:34:08Z"

I looked at the header and saw that these information are also available there:

X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4970
X-RateLimit-Reset: 1503761648

It seems though as if the cost is missing. Is that on purpose?


Hi @leifg!

Great question!

Right now, the rate limit cost information is only available via the GraphQL query, and not in the response headers. This is ‘on purpose’ insomuch as it’s known, and something that we’re wanting to fix at some point.

Is this causing any problems for you? I’d love to understand your use cases!


It’s not really causing problems just a minor inconvenience.

I’m calling the GraphQL API to fetch releases and recording my usage (to determine when I should call the API again). The payload handling is happening by a different module so it would have been nice to keep the header for recording the usage and passing on the payload (without parsing) to a different part of the application.