BE: Expose blocked and blocking work items for EpicType
Summary
As we are updating relationship icons across epic and issue boards and lists, we need to expose all WIT (issue, task, objective, key result) that can be blocked by or blocking an epic. Currently on epic boards we are unable to query any blocking/blocked items that are not epic types. frontend only gets epic type blockers/blocking items on epic board via app/assets/javascripts/vue_shared/components/issuable_blocked_icon/graphql/blocking_epics.query.graphql
:
This issue also closely relates to #499362 (closed).
Proposal
Step 1. Add a new field to EpicType
called blocked_by_work_items
that returns a list of work items that are blocking the epic
Example query:
query epicBlockingItems {
group(fullPath: "flightjs") {
name
epics(iid: "18") {
edges {
node {
name
blockedByWorkItems {
edges {
node {
name
}
}
}
}
}
}
}
}
Step 2. Add a new field to EpicType
called work_items_blocked_by_epic
that returns a list of work items that are blocked by the epic
Example query:
query itemsBlockedByEpic {
group(fullPath: "flightjs") {
name
epics(iid: "16") {
edges {
node {
name
workItemsBlockedByEpic {
edges {
node {
name
}
}
}
}
}
}
}
}