Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
graphql examples for github api
query {
  viewer {
    login
  }
}
query {
  viewer {
    login
    bioHTML
    avatarUrl(size: 2)
    commitComments(first: 1) {
      edges {
        cursor
      }
      nodes {
        body
      }
      totalCount
    }
  }
}
query {
  repository(owner: "ma2gedev", name: "power_assert_ex") {
    id
    name
    issues(first:2) {
      totalCount
      nodes {
        title
      }
    }
    description
    createdAt
    codeOfConduct {
      body
      url
    }
  }
}
mutation {
  addStar(input:{
    starrableId: "MDEwOlJlcG9zaXRvcnk0MzQzODc4NA=="
  }){
    starrable {
      stargazers(first: 3) {
        nodes{
          name
        }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment