GraphQL: How to call `updateIssue` with only an `IssueID`

GraphQL: How to call updateIssue with only having the IssueID?

In GraphQL having the IssueID for an Issue I want to call Mutation.updateIssue. I can call Query.issue no problem, but to call update, I need the iid and projectPath of the issue.
However it seems Issue only has the projectId and there is no direct path to query a project by id, because Query.project requires the projectPath as well. So what I have to do now is

  • Query.issue to get iid and projectId
  • Query.projects to search by gid which I have to manually construct like gid://gitlab/Project/${projectId} and taking the first result
  • Mutation.updateIssue

The second step really feels wrong, but I could not find a better way to get the information I need.

Are there any fields or queries I’m missing?

Versions

Please add an x whether options apply, and add the version information.

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

Versions