Using GraphQL API with Apps


#1

How can I use the GraphQL API in a GitHub App?


#2

GitHub Apps can only be used with the REST API at this time. We are working on GraphQL support.


#3

@jch: is there a rough timeline of when we can expect the GraphQL API? Months, years?


#4

@samuelli it’s currently in progress. You can expect GraphQL support for GitHub Apps some time in the coming months.


#5

This would be incredibly helpful, is there any way to access a beta of the API or any updates on the timeline?


#6

Good news, everyone! GraphQL may now be used by GitHub Apps!
https://developer.github.com/changes/2018-04-30-graphql-supports-github-apps/


#7

@vroldanbet

The search stopped working, could you please help ASAP. (Or it actually hasn’t worked at all)


#8

The changelog post says that GraphQL requests “can be made by users authorized through a GitHub App.”

Does that mean I have to use the user OAuth tokens to act on behalf of users (like described here)? Can I just use my App’s OAuth token generated after making the JWT request? I would want mutations attributed to my App, especially for stuff like Check Runs.


#9

You can just use the server-to-server access token as you normally would :sunglasses:.


#10

Thanks, that’s good to hear! The docs should make that more clear, since the wording seems ambiguous to me.