Bundle GraphQL Operations
Table of Contents
Overview
This document provides an overview of the GraphQL API for managing bundles within a project. It includes the available queries and mutations, as well as the types used in the API.
Schemas
Query
bundle
Fetches a specific bundle by its ID.
Arguments:
id: String!
- The unique identifier of the bundle. Required
Returns:
Example:
query {
bundle(id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e") {
id
name
projectId
startDate
releaseDate
versionId
description
archived
children {
componentVersionId
}
released
}
}
bundles
Fetches all bundles for a given project.
Arguments:
projectId: String!
- The unique identifier of the project. Required
Returns:
[Bundle] - An array of bundles.
Example:
query {
bundles(projectId: "10000") {
id
name
projectId
startDate
releaseDate
versionId
description
archived
released
}
}
bundlesWithinDateRange
Fetches all bundles within a specified date range for a given project.
Arguments:
startDate: String!
- The start date of the range. RequiredendDate: String!
- The end date of the range. RequiredprojectId: String!
- The unique identifier of the project. Required
Returns:
[Bundle] - An array of bundles.
Example:
query {
bundlesWithinDateRange(
startDate: "2024-01-01"
endDate: "2024-12-31"
projectId: "10000"
) {
id
name
projectId
startDate
releaseDate
versionId
description
archived
released
}
}
Mutation
saveBundle
Saves a new bundle or updates an existing one.
Arguments:
newBundle:
InputBundle! - The input data for the bundle. RequiredoldBundleId: String
- The unique identifier of the existing bundle to update.
Returns:
SavedBundle - The saved or updated bundle.
Example:
addComponentVersionToBundle
Adds a component version to an existing bundle.
Arguments:
bundleId:
String! - The ID of the bundle. RequirednewComponentVersionId: String!
- The ID of the new component version to add. RequiredoldComponentVersionId: String
- The ID of the old component version to replace.
Returns:
SavedBundle - The updated bundle.
Example:
deleteBundle
Deletes a specific bundle by its ID.
Arguments:
id: String!
- The unique identifier of the bundle. Required
Returns:
String!
- A message indicating the result of the deletion.
Example:
deleteCVFromBundle
Deletes a component version from a bundle.
Arguments:
bundleId: String!
- The unique identifier of the bundle. RequiredcomponentVersionId: String!
- The unique identifier of the component version to delete. Required
Returns:
String!
- A message indicating the result of the deletion.
Example:
Types
Bundle
Represents a bundle within a project.
Fields:
id: String!
- The unique identifier of the bundle.name: String!
- The name of the bundle.projectId: String!
- The unique identifier of the project.startDate: Int!
- The start date of the bundle as a timestamp.releaseDate: Int!
- The release date of the bundle as a timestamp.versionId: String
- The version identifier of the bundle.description: String
- A description of the bundle.archived: Boolean!
- Indicates if the bundle is archived.children:
[ComponentVersionBundle] - The component versions included in the bundle.released: Boolean!
- Indicates if the bundle is released.
SavedBundle
Represents a saved bundle within a project.
Fields:
id: String!
- The unique identifier of the bundle.name: String!
- The name of the bundle.projectId: String!
- The unique identifier of the project.startDate: String
- The start date of the bundle.releaseDate: String
- The release date of the bundle.versionId: String
- The version identifier of the bundle.archived: Boolean!
- Indicates if the bundle is archived.released: Boolean!
- Indicates if the bundle is
released.
ComponentVersionBundle
Represents a component version within a bundle.
Fields:
componentVersionId: String!
- The unique identifier of the component version.
InputBundle
Input type for saving or updating a bundle.
Fields:
id: String
- The unique identifier of the bundle.name: String!
- The name of the bundle. RequiredprojectId: String!
- The unique identifier of the project. Requiredarchived: Boolean!
- Indicates if the bundle is archived. Requiredreleased: Boolean!
- Indicates if the bundle is released. RequiredstartDate: String
- The start date of the bundle.releaseDate: String
- The release date of the bundle.versionId: String
- The version identifier of the bundledescription: String
- A description of the bundle.