Skip to content

Incorrect params for field isRequired under pullRequest -> statusCheckRollup -> contexts #4197

@Oripi

Description

@Oripi

Bug report

Hi, it looks like there's an issue with the isRequired field under repo -> pullRequests -> nodes -> statusCheckRollup -> contexts -> nodes -> isRequired

the field requires params, but they should be inferred in this context.
example query:

query ($var1: String!, $var2: String!) {
  repo: repository(owner: $var1, name: $var2) {
    pullRequests(first: 4, states: [OPEN]) {
      totalCount
      nodes {
        title
        statusCheckRollup {
          contexts(first: 50) {
            nodes {
              ... on StatusContext {
                id
                description
                # params are required here, but in this context the id of the PR is known
                isRequired
              }
            }
          }
        }
      }
    }
  }
}

error:

{
	"type": "UNPROCESSABLE",
	"path": [
		"repository",
		"pullRequests",
		"nodes",
		4,
		"statusCheckRollup",
		"contexts",
		"nodes",
		2,
		"isRequired"
	],
	"locations": [
		{
			"line": 19,
			"column": 9
		}
	],
	"message": "A pull request ID or pull request number is required."
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions