GitHub GraphQL

फ़्री
GraphQL
द्वारा RapidAPI | अपडेट किया गया 7 days ago | Social
Health Check

N/A

रीडमी

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
API को रेट करने के लिए लॉग इन करें
रेटिंग: 5 - वोट: 1