isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

Allow unauthenticated trivial GraphQL queries #972

Open strugee opened 7 years ago

strugee commented 7 years ago

(Just sent this to GitHub Support:)

I'm writing a CLI application that makes a single GraphQL query - getting the total issue count of a particular user. This query is just about as simple as they get.

And yet, when I try to post to the GraphQL endpoint, like so:

% echo '{user(login: "strugee") {issues {totalCount}}}' | http POST https://api.github.com/graphql

I get 401 Unauthorized and a message saying that I have to be authenticated. This is really a huge bummer, honestly. I shouldn't need to be authenticated to get this information. Instead you should have sensible rate-limits like the v3 API had (I mean, this usecase would've easily stayed well within the v3 rate limits for unauthenticated requests). Unless I'm missing something?

Cheers,

AJ

strugee commented 7 years ago

From GitHub support today:

Hey Alex,

GraphQL currently requires Authentication but I will pass your request for the ability to make anonymous request to our team for consideration.

I can't promise if or when we would add this but I'll for sure pass it along.

Cheers Stacey

jasonhansel commented 6 years ago

This would be useful for me also! Especially if the API supported CORS, so that requests could be made from within the client's browser.