Skip to content

Minimise rate limiting #10

Open
@domoscargin

Description

@domoscargin
Contributor

Investigate whether we can:

  • reduce API calls
  • set concurrency limits
  • other

Activity

domoscargin

domoscargin commented on Dec 19, 2024

@domoscargin
ContributorAuthor

We can investigate the graphQL API to collect more data in one call.

Something like:

  const query = `
    query($owner: String!, $name: String!) {
      repository(owner: $owner, name: $name) {
        createdAt
        pushedAt
        object(expression: "HEAD:package.json") {
          ... on Blob {
            text
          }
        }
        packageLock: object(expression: "HEAD:package-lock.json") {
          ... on Blob {
            text
          }
        }
        yarnLock: object(expression: "HEAD:yarn.lock") {
          ... on Blob {
            text
          }
        }
      }
    }
  `

would get the repo metadata, and the package file in one go. (I don't know GraphQL...)

linked a pull request that will close this issue on Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @domoscargin

      Issue actions

        Minimise rate limiting · Issue #10 · alphagov/design-system-github-stats