Add basic Release GraphQL endpoint
What does this MR do?
Adds a basic subset of the data currently available in our REST Release API to our GraphQL endpoint.
What doesn't this MR do?
This MR does not implement the assets
field (which is currently available through the REST Release API). This property was left out in an effort to make this MR smaller and easier to review. This field will be added in a follow-up MR.
Feature flag
This new data is hidden behind a graphql_release_data
feature flag, which is disabled by default.
Example query/response
Getting a single Release by tag name
Click to expand query
{
project(fullPath: "root/release-test") {
release(tagName: "v16.5") {
name
tagName
tagPath
description
descriptionHtml
evidenceSha
createdAt
updatedAt
releasedAt
author {
name
}
commit {
sha
}
milestones {
nodes {
title
}
}
}
}
}
Click to expand response
{
"data": {
"project": {
"release": {
"name": "v16.5",
"tagName": "v16.5",
"tagPath": "/root/release-test/-/tags/v16.5",
"description": "Release notes here.",
"descriptionHtml": "<p data-sourcepos=\"1:1-1:19\" dir=\"auto\">Release notes here.</p>",
"evidenceSha": "08f63709250846dc29b9108bcbc90cd3dcecbc9ce02d",
"createdAt": "2019-11-21T18:45:49Z",
"updatedAt": "2020-04-09T14:50:42Z",
"releasedAt": "2020-06-21T18:45:49Z",
"author": {
"name": "Nathan Friend"
},
"commit": {
"sha": "87fdf474c9e453a8e9ece1353fe7ff915b1e9ccd"
},
"milestones": {
"nodes": [
{
"title": "13.20"
}
]
}
}
}
}
}
Getting a list of Releases
Click to expand query
{
project(fullPath: "root/release-test") {
releases(first: 5) {
nodes {
name
}
}
}
}
Click to expand response
{
"data": {
"project": {
"releases": {
"nodes": [
{
"name": "v16.5"
},
{
"name": "Version 16.4 (pre)"
},
{
"name": "Version 16.3"
},
{
"name": "Version 16.2"
},
{
"name": "An API Release"
}
]
}
}
}
}
Related to: #208702 (closed), #208724 (closed), !27448 (closed), !27614 (closed)
Edited by Alex Kalderimis