-
Notifications
You must be signed in to change notification settings - Fork 879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use GitHub GraphQL query to get the file content #12
Comments
Thanks for this wonderful idea, yes I thought GraphQL query would be better for this, I will try it in this days |
Thanks for your awesome idea & project. And I'd like to contribute and file PR. Could you please tell me if you want any means to collaborate together? |
Hey @conwnet First off, kudos on the project as it's been great to use! Lacking the use of Github's graphQL API is the first thing that I realized while looking at the codebase and I want to contribute to building this with you @xcv58. So let me know if I can grab this issue to work on or collaborate with you to work on it! |
Thanks @kanhegaonkarsaurabh, I think there are multiple tasks to enable GraphQL and we need input from @conwnet about how we deal with the users don't want to add a personal access token.
For users who don't want to authorize their GitHub account, I think there are two solutions:
And above is just my thought, please share your thought @conwnet @kanhegaonkarsaurabh . |
I had a sample apollo client setup here and will iterate on it: https://github.com/xcv58/github1s/pull/1/files |
Thanks everyone first. The GitHub OAuth workflow is really better way to improve experience. |
+1 for this.
We don’t need this approach if you think the effort to maintain the RESTful fallback is acceptable. I had requested a high rate limit GitHub API access five years ago through education program. Not sure it’s still doable. But anyway I prefer to keep the RESTful fallback. |
There are multiple benefits to use GraphQL query instead of the RESTful endpoints:
Sample GraphQL query:
https://gist.github.com/MichaelCurrin/6777b91e6374cdb5662b64b8249070ea
and screenshot via https://docs.github.com/en/graphql/overview/explorer
The blocker I saw is the GitHub GraphQL API needs authentication: https://docs.github.com/en/graphql/guides/forming-calls-with-graphql. Which could use the OAuth flow to build a UI redirect page to request before users start to use:
https://docs.github.com/en/developers/apps/authorizing-oauth-apps#web-application-flow
The text was updated successfully, but these errors were encountered: