GitHub GraphQL

무료
분류별 RapidAPI | 업데이트됨 16 giorni fa | Social
Health Check

N/A

README

Authenticating with GraphQL

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 for the command line” 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. If you need access to repository information, select the appropriate Repository scopes.

Request the following scopes:

user
public_repo
repo
repo_deployment
repo:status
read:repo_hook
read:org
read:public_key
read:gpg_key

The GraphQL endpoint

The REST API v3 has numerous endpoints; the GraphQL API v4 has a single endpoint:

https://github-graphql2.p.rapidapi.com/graphql
The endpoint remains constant no matter what operation you perform.

Example Queries

Simple Query

query {
  repository(owner:"octocat", name:"Hello-World") {
    issues(last:20, states:CLOSED) {
      edges {
        node {
          title
          url
          labels(first:5) {
            edges {
              node {
                name
              }
            }
          }
        }
      }
    }
  }
}

Working with Variables

GQL Query:

query($number_of_repos:Int!) {
  viewer {
    name
     repositories(last: $number_of_repos) {
       nodes {
         name
       }
     }
   }
}

Variables:

{
  "number_of_repos": 3
}
팔로워: 1
자원:
제품 웹사이트 이용 약관
API 생성자 :
Rapid account: Rapid API
RapidAPI
rapidapi
Rate API에 로그인
등급: 5 - 투표: 1