Add a GraphQL wrapper for Jira projects REST API
What does this MR do?
Adds a GraphQL wrapper over jira projects api to allow us to pull jira projects from FE by running a GraphQL query.
Because we are using jira integration, i.e jira service to connect to jira instance, we are also using the service to return jira projects.
This MR is dependent on exposing project services MR which can be seen here for context: !28234 (merged)
A project can have multiple services enabled, so to pull jira service specifically we can run a query like:
query {
project(fullPath: "gitlab-org/acroitor-test-group/acroitor-test-subgroup1/jira-import-test2") {
services(active: true, type: JIRA_SERVICE) {
edges {
node {
... on JiraService {
projects(name: "AL") {
pageInfo {
hasNextPage
}
edges{
node{
key
name
}
}
}
}
}
}
}
}
}
And result is:
{
"data": {
"project": {
"services": {
"edges": [
{
"node": {
"projects": {
"pageInfo": {
"hasNextPage": false
},
"edges": [
{
"node": {
"key": "AL",
"name": "Alex"
}
},
{
"node": {
"key": "DON",
"name": "Donald"
}
}
]
}
}
}
]
}
}
}
}
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Jarka Košanová