[BE] [API] Make changes to workItemTypes query to accept organization id
Currently the namespaceWorkItemTypes accepts the fullPath of the namespace (be it a project / group) but in admin or self managed , we do not have any namespace.
So we should be allowing the organization id to support future scalability when we can switch organizations
The idea behind the query would look something like this to fetch top level field depending on the variables
#import "ee_else_ce/work_items/graphql/work_item_type.fragment.graphql"
query namespaceWorkItemTypes($fullPath: ID, $name: IssueType, $onlyAvailable: Boolean = false, $organizationId: ID) {
workspace: namespace(fullPath: $fullPath) @include(if: $fullPath) {
id
webUrl
workItemTypes(name: $name, onlyAvailable: $onlyAvailable) {
nodes {
...WorkItemTypeFragment
}
}
}
organization @include(if: $organizationId) {
id
workItemTypes(onlyAvailable: $onlyAvailable) {
nodes {
...WorkItemTypeFragment
}
}
}
}
Edited by Deepika Guliani