sincecutoff.com
← all changes

GitHub GraphQL API adds issue relates-to queries and mutations

Introduced 2026-09-28 · score 0.97

HOW TO USE IT

When managing related issues through GitHub’s GraphQL API, query `Issue.relatesTo` with pagination and ordering, or use `addRelatesTo` and `removeRelatesTo` to change a relationship.

query { node(id: "<issue-id>") { ... on Issue { relatesTo(first: 20, orderBy: {field: RELATES_TO_ADDED_AT, direction: DESC}) { nodes { id } pageInfo { endCursor hasNextPage } } } } }
mutation { addRelatesTo(input: {issueId: "<issue-id>", relatedIssueId: "<related-issue-id>"}) { issue { id } relatedIssue { id } } }
mutation { removeRelatesTo(input: {issueId: "<issue-id>", relatedIssueId: "<related-issue-id>"}) { issue { id } relatedIssue { id } } }

WHY THIS HELPS

Manage related issues while updating a repository's issue data through the GraphQL API.

REQUIREMENTS AND LIMITATIONS

  • Issue.relatesTo.first: Return the first n related issues.
  • Issue.relatesTo.last: Return the last n related issues.
  • Issue.relatesTo.after: Return elements after the specified cursor.
  • Issue.relatesTo.before: Return elements before the specified cursor.
  • Issue.relatesTo.orderBy: Ordering options for related issues.
  • IssueRelatesToOrder.field (required): Order by `CREATED_AT` (related issue creation time) or `RELATES_TO_ADDED_AT` (when the relationship was added).
  • IssueRelatesToOrder.direction (required): Ordering direction (`OrderDirection!`).
  • AddRelatesToInput.issueId (required): ID of the issue.
  • AddRelatesToInput.relatedIssueId (required): ID of the related issue.
  • AddRelatesToInput.clientMutationId: Client mutation identifier.
  • RemoveRelatesToInput.issueId (required): ID of the issue.
  • RemoveRelatesToInput.relatedIssueId (required): ID of the previously related issue.
  • RemoveRelatesToInput.clientMutationId: Unique identifier for the client performing the mutation.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card