Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GraphQL #4

Open
FranklinYu opened this issue Jan 5, 2020 · 1 comment
Open

Use GraphQL #4

FranklinYu opened this issue Jan 5, 2020 · 1 comment

Comments

@FranklinYu
Copy link

An example GraphQL query that gathers most required information is

{
  repository(owner: "owncloud", name: "core") {
    issues(first: 100) {
      nodes {
        createdAt
        number
        timelineItems(itemTypes: [CLOSED_EVENT, REOPENED_EVENT], first: 10) {
          nodes {
            __typename
            ... on ClosedEvent {
              createdAt
            }
            ... on ReopenedEvent {
              createdAt
            }
          }
          pageInfo {
            hasNextPage
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
  }
  rateLimit {
    limit
    cost
    remaining
    resetAt
  }
}

It is so cheap that we probably don’t need API token for public repositories.

@jonyMarino
Copy link

@FranklinYu how do you run this code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants