Enable GET method for v4 query API (GraphQL)

Currently, the GitHub v4 API only supports POSTing the GraphQL query via application/json body.

GraphQL describes how to serve queries over both HTTP GET and HTTP POST. One difference between GET and POST requests is that GET requests may be cached by HTTP proxies, while POST requests may not, because they are not idempotent.

It would be handy for some projects that make heavy use of the v3 API via caching to be able to migrate queries to v4, particularly as v4 exposes some additional information (one example: distinguishing between the direct and indirect group members). Exposing the current query interface over GET as well as POST could enable those project to make fewer queries by fetching data more efficiently. Today for these projects, the cost of an (uncached) v4 query is much higher than a dozen v3 API requests with a cache in front.

Welcome to the GitHub Support Community @evankanderson! Our team is open to considering suggestions we receive about existing features. As a next step, would you mind submitting this through our official product feedback form so that our product team can track your request? That’s the best place to share requests like these in consideration for future iterations of GitHub features.

Also, while I can’t personally speak to any upcoming changes, I encourage you to check out our GitHub public roadmap for upcoming features in addition to The GitHub Blog for new feature announcements.

Does this help?

Thanks, I filled out the product feedback form, but wanted to post here in case there were other users with the same problem.

2 Likes