Forming calls with GraphQL - GitHub Docs
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" 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.
https://docs.github.com/en/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql