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. Required

  • endDate: String! - The end date of the range. Required

  • projectId: 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. Required

  • oldBundleId: String - The unique identifier of the existing bundle to update.

Returns:

Example:


addComponentVersionToBundle

Adds a component version to an existing bundle.

Arguments:

  • bundleId: String! - The ID of the bundle. Required

  • newComponentVersionId: String! - The ID of the new component version to add. Required

  • oldComponentVersionId: String - The ID of the old component version to replace.

Returns:

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. Required

  • componentVersionId: 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. Required

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

  • archived: Boolean! - Indicates if the bundle is archived. Required

  • released: Boolean! - Indicates if the bundle is released. Required

  • startDate: String - The start date of the bundle.

  • releaseDate: String - The release date of the bundle.

  • versionId: String - The version identifier of the bundle

  • description: String - A description of the bundle.