Skip to content

Make GraphQL argument epicID nullable

What does this MR do?

Given that arguments nullability was introduced in !66618 (merged), we can now use it for epicID in the mutation Mutations::Issues::SetEpic that sets the epic for an issue.

Example query with argument missing

mutation {
  issueSetEpic(input:{projectPath: "flightjs/Flight", iid: "43"}) {
    issue {
      epic {
        id 
      }
    }
  }
}

Response

{
  "errors": [
    {
      "message": "Internal server error: Arguments must be provided: epicId"
    }
  ]
}

Example query with null argument

mutation {
  issueSetEpic(input:{projectPath: "flightjs/Flight", iid: "43", epicId: null}) {
    issue {
      epic {
        id 
      }
    }
  }
}

Response

{
  "data": {
    "issueSetEpic": {
      "issue": {
        "epic": null
      }
    }
  }
}

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Merge request reports