Problem
Currently, it is not possible to delete issues via the GitHub REST API (see discussion).
However, this functionality is available through the GitHub GraphQL API via the deleteIssue mutation.
We should implement a function in our codebase to allow deleting issues using GraphQL.
Proposed Implementation
- Use the
graphql or graphql_flutter Dart package for sending GraphQL queries/mutations.
- Create a helper function to:
- Authenticate with a GitHub personal access token.
- Send the
deleteIssue mutation with the required issueId.
- Handle success/failure responses appropriately.
Example mutation:
mutation {
deleteIssue(input: {issueId: "ISSUE_ID"}) {
clientMutationId
}
}
Problem
Currently, it is not possible to delete issues via the GitHub REST API (see discussion).
However, this functionality is available through the GitHub GraphQL API via the
deleteIssuemutation.We should implement a function in our codebase to allow deleting issues using GraphQL.
Proposed Implementation
graphqlorgraphql_flutterDart package for sending GraphQL queries/mutations.deleteIssuemutation with the requiredissueId.Example mutation: