axetroy / todo

个人的TODO计划, 不要Fork,可以Watch
http://www.axetroy.xyz/#/todo
0 stars 2 forks source link

Github的api调用使用GraphQL #25

Closed axetroy closed 7 years ago

axetroy commented 7 years ago

随着Github需要统计请求的数据越来越多,我已经不敢再添加新内容了。

动则发送几百个http请求。

好在Github支持GraphQL协议

能够把多个合并到一个请求。抽空学习下这个协议,应用到站点内。

已废弃

需要OAuth验证才能使用GraphQL服务器. 不适合当前的场景

To communicate with the GraphQL server, you'll need an OAuth token with the right scopes.

Follow the steps in "Creating a personal access token for the command line" to create a token. The scopes you require depends on the type of data you're trying to request. For example, select the User scopes to request user data. If you need access to repository information, select the appropriate Repository scopes.

又翻出来了,体验了一会,真是太棒了