How to query GitHub api v4 from client side javascript?

Viewed 472

I'd like to make a small web app using only client side javascript, that is publicly available on GitHub and hosted via GitHub Pages, that renders information about the different repositories of an organization on GitHub.

Is this possible to do in such a way that:

  1. allows me to authenticate with GitHub without compromising a secret key,

  2. allows me to query GitHub's new graphql api?

In both cases, the docs seem to suggest that the answer to my questions are "no" and "no":

I'm seeking guidance here in the hopes that I'm misreading the docs, and that there really is a way to:

  • build a static-site that authenticates with GitHub for the increased query rate limit size,
  • and that, when a user visits the page, queries the v4 api and displays the appropriate information about the current status of the various repos of an organization.
1 Answers
Related