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:
[ComponentVersion] - An array of component versions.
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ıredendDate: String!
- The end date of the range. RequıredprojectId: String!
- The unique identifier of the project. Requıred
Returns:
[ComponentVersion] - An array of component versions.
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:
compVersionData:
ComponentVersionInput- The input data for the component version. Requıred
Returns:
ComponentVersion! - The saved or updated component version.
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ıredreleaseDate: 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ıredversionId: String!
- The unique identifier of the version. RequıredcomponentId: String!
- The unique identifier of the component. RequıredstartDate: 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.
Â