mntnr / name-your-contributors

Name your GitHub contributors; get commits, issues, and comments
MIT License
73 stars 20 forks source link

fix: rate limit detection #108

Closed alanshaw closed 5 years ago

alanshaw commented 5 years ago

body is not null. In my experience I got:

body: '{"data":{"rateLimit":{"cost":1,"remaining":0,"resetAt":"2019-08-05T12:01:30Z"},"node":{"comments":{"pageInfo":{"endCursor"...

I'm not certain why it would need to be null and why inspection of the header wouldn't suffice.

status check is also unnecessary, queryRequest rejects for non-200 responses so rateLimited will not be called in this case.

RichardLitt commented 5 years ago

@alanshaw Awesome! I've been wondering about this. Thank you.