Component Version GraphQL Operations

Table of Contents

Overview

This page provides an overview of the CMTC GraphQL API for managing component versions within a project. It includes the available queries and mutations, as well as the types used in the API.

Query

componentVersion

Fetches a specific component version by its ID.

Arguments:

  • id: String! - The unique identifier of the component version. Requıred

Returns:

Example:

query { componentVersion(id: "componentVersion-10000-10000-10000" ) { id projectId versionId componentId startDate releaseDate description archived released } }

componentVersions

Fetches all component versions for a given project.

Arguments:

  • projectId: String! - The unique identifier of the project. Requıred

Returns:

Example:

query { componentVersions(projectId: "10000") { id projectId versionId componentId startDate releaseDate description archived released } }

componentVersionsWithinDateRange

Fetches all component versions within a specified date range for a given project.

Arguments:

  • startDate: String! - The start date of the range. Requıred

  • endDate: String! - The end date of the range. Requıred

  • projectId: String! - The unique identifier of the project. Requıred

Returns:

Example:

query { componentVersionsWithinDateRange( startDate: "2024-01-01" endDate: "2024-12-31" projectId: "10000" ) { id projectId versionId componentId startDate releaseDate description archived released } }

Mutation

saveComponentVersion

Saves a new component version or updates an existing one.

Arguments:

Returns:

Example:


deleteComponentVersion

Deletes a specific component version by its ID.

Arguments:

  • id: String! - The unique identifier of the component version. Requıred

Returns:

  • String! - A message indicating the result of the deletion.

Example:


releaseComponentVersion

Releases a specific component version, optionally moving issues to another version.

Arguments:

  • id: String! - The unique identifier of the component version. Requıred

  • releaseDate: String - The release date of the component version.

  • moveIssuesTo: String - The ID of the component version to move issues to.

Returns:

  • String! - A message indicating the result of the release.

Example:


unreleaseComponentVersion

Unreleases a specific component version.

Arguments:

  • id: String! - The unique identifier of the component version. Requıred

Returns:

  • String! - A message indicating the result of the unrelease.

Example:


Types

ComponentVersion

Represents a component version within a project.

Fields:

  • id: String! - The unique identifier of the component version.

  • projectId: String! - The unique identifier of the project.

  • versionId: String! - The unique identifier of the version.

  • componentId: String! - The unique identifier of the component.

  • startDate: String - The start date of the component version.

  • releaseDate: String - The release date of the component version.

  • description: String - A description of the component version.

  • archived: Boolean! - Indicates if the component version is archived.

  • released: Boolean! - Indicates if the component version is released.


ComponentVersionInput

Input type for saving or updating a component version.

Fields:

  • projectId: String! - The unique identifier of the project. Requıred

  • versionId: String! - The unique identifier of the version. Requıred

  • componentId: String! - The unique identifier of the component. Requıred

  • startDate: String - The start date of the component version.

  • releaseDate: String - The release date of the component version.

  • description: String - A description of the component version.

  • archived: Boolean - Indicates if the component version is archived.

  • released: Boolean - Indicates if the component version is released.

Â