Using GraphQL API with Apps


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


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


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


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


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


Good news, everyone! GraphQL may now be used by GitHub Apps!



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


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.


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


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