GitHub GraphQL

GRATIS
GraphQL
Da RapidAPI | Aggiornamento 5 days ago | 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
}
Follower: 1
Risorse:
Sito web del prodotto Termini di utilizzo
Creatore dell'API:
Rapid account: Rapid API
RapidAPI
rapidapi
Accedi per valutare l'API
Valutazione: 5 - Voti: 1