Skip to content

Including commits in --json fields of gh pr list too easily exceeds graphql node limits #5114

@catskul

Description

@catskul

Describe the bug and Steps to reproduce the behavior

When using:

  • gh pr list -L 50 --author=@me --json commits,

error returned:

  • GraphQL: By the time this query traverses to the authors connection, it is requesting up to 505,050 possible nodes which exceeds the maximum limit of 500,000.

Would seem that especially given the author restriction that the query should not be unreasonable.

Expected vs actual behavior

No error for such a small query.

In my specific case I just wanted to know the number of commits for use in table output, so alternatively to fixing the commit query, providing that information in some other way; another field perhaps.

Logs

Unaware of any logs available to share.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageneeds to be reviewed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions