List releases (GraphQL)

listReleases(projectReference: String, first: Int, after: String, sortBy: ReleaseSortField, sortOrder: ReleaseSortOrder): ReleasesConnection

Requires project.releases.read.

Arguments

ArgumentTypeRequiredDescription
projectReferenceStringNoProject reference. Defaults to the request's project scope, or the authenticated account's accessible projects.
firstIntNoMaximum number of releases to return, between 1 and 100. Omit to return the complete list.
afterStringNoCursor from the previous page's pageInfo.endCursor. Releases are ordered by sortBy and sortOrder, newest first by default, with ties by release ID ascending; a continuation is bound to the same project or account and ordering.
sortByReleaseSortFieldNoSort field. Defaults to created_at.
sortOrderReleaseSortOrderNoSort order. Defaults to desc.

Response

Returns ReleasesConnection. Open the type for its fields and nested types.

FieldType
data[Release!]
pageInfoPageInfo

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
query ListReleases($projectReference: String, $first: Int, $after: String, $sortBy: ReleaseSortField, $sortOrder: ReleaseSortOrder) {
  listReleases(projectReference: $projectReference, first: $first, after: $after, sortBy: $sortBy, sortOrder: $sortOrder) {
    data {
      id
      projectId
      name
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001"
}