Subcomponent 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

folder

Fetches a specific folder by its ID.

Arguments:

  • id: String! - The unique identifier of the folder. Required

Returns:

Example:

query { folder(id: "folder-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e") { id name projectId after parentId description } }

folders

Fetches all folders for a given project.

Arguments:

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

Returns:

  • [Folder] - An array of bundles.

Example:

query { folders(projectId: "10000") { id name projectId after parentId description }

subcomponents

Fetches all subcomponents for a given project.

Arguments:

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

Returns:

Example:

query { subcomponents(projectId: "10000") { id name projectId isProjectcomponent after parentId description }

subcomponent

Fetches a specific subcomponent by its ID.

Arguments:

  • id: String! - The unique identifier of the subcomponent. Required

Returns:

Example:


Mutation

saveFolder

Edit a folder.

Arguments:

  • id: String! - Updated Folder id.

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

Returns:

  • Folder - The saved or updated folder.

Example:


updateFolder

Edit a folder.

Arguments:

  • id: String! - Updated Folder id.

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

Returns:

  • Folder - The saved or updated folder.

Example:


deleteFolder

Delete a folder.

Arguments:

  • id: String! - Deleted Folder id.

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

Returns:

Example:


addSubcomponent

Adds a subcomponent to a subcomponent.

Arguments:

  • id: String! - The added subcomponent id. Required

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

  • parentId: String! - The id of new parent. Required

  • isVirtual: Boolean! - Type of added subcomponent. If subcomponent is folder, isVirtual parameter should be true. Required

Returns:

Example:


removeSubcomponent

Removes a subcomponent from its parent.

Arguments:

  • id: String! - The removed subcomponent id. Required

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

  • isVirtual: Boolean! - Type of added subcomponent. If subcomponent is folder, isVirtual parameter should be true. Required

Returns:

Example:


Types

Subcomponent

Represents a bundle within a project.

Fields:

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

  • name: String! - Name of the subcomponent.

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

  • isChild: Boolean! - If it is child subcomponent, isChild is true.

  • after: String! - Previous subcomponent id of subcomponent on project.

  • isProjectComponent: Boolean! - Value for checking subcomponent is project component.

  • parentId: String - The unique identifier of subcomponent’s parent.


Folder

Represents a saved bundle within a project.

Fields:

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

  • name: String! - The name of the folder.

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

  • after: String! - Previous subcomponent id of subcomponent on project.

  • isChild: Boolean! - If it is child subcomponent, isChild is true.

  • parentId: String - The unique identifier of subcomponent’s parent.

  • isProjectComponent: Boolean! - Value for checking subcomponent is project component.

Â