Skip to content

Add release `upcoming_release` field to GraphQL

Nathan Friend requested to merge nfriend-add-upcoming-release-to-graphql into master

What does this MR do?

Adds the release's upcoming_release field to the GraphQL endpoint. This boolean field returns true if the release's released_at date is in the future.

Example query/response

Query:

{
  project(fullPath: "root/release-test") {
    releases(first: 2) {
      nodes {
        releasedAt
        upcomingRelease
      }
    }
  }
}

Response:

{
  "data": {
    "project": {
      "releases": {
        "nodes": [
          {
            "releasedAt": "2030-03-15T08:00:00Z",
            "upcomingRelease": true
          },
          {
            "releasedAt": "2020-09-02T17:02:55Z",
            "upcomingRelease": false
          }
        ]
      }
    }
  }
}

Related to #214241 (closed)

Merge request reports