No matter what I tried, I can only fetch those issues that have state set to OPEN. Is this a known limitation of the API?
Can be done via SprintIssues
.
query SprintIssues($id: ID!) {
node(id: $id) {
... on Sprint {
sprintIssues {
nodes {
issue {
id
number
title
state
repository {
name
}
labels {
nodes {
name
}
}
assignees {
nodes {
login
}
}
createdAt
updatedAt
}
}
}
}
}
}
Thanks for following up with your solution! If you want all of the closed issues in the workspace (not just in a sprint) you can also use something like this:
query closedIssues($workspaceId: ID!) {
searchClosedIssues(workspaceId: $workspaceId, filters: {}, first:50) {
nodes {
id
title
}
}
}
@_af what is the process of discovering these endpoints in your API?
It is a total mystery to me (and, apparently, to AI coding assistants I have been using).
I recommend using the Graphql Explorer at Explorer | Zenhub Developers
Once you enter your API key, you can click the “book” icon on the left and that will list out the available endpoints you can use in the API
1 Like