Subproject GraphQL Operations

Table of Contents

Overview

This document provides an overview of the GraphQL API for managing subprojects within a site. It includes the available queries and mutations, as well as the types used in the API.

Schemas

Query

projectFolder

Fetches a specific folder by its key.

Arguments:

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

Returns:

Example:

query { projectFolder(id: "folder-9e93307c-12ab-4a6a-9119-e427f0f1e04e-1.5") { id key name order description parentId isVirtual isChild } }

projectFolders

Fetches all project folders.

Arguments:

  • No arguments required.

Returns:

Example:

query { folders() { id name order parentId description isVirtual }

subprojects

Fetches all subprojects.

Arguments:

  • No arguments required.

Returns:

Example:

query { subprojects() { id key name isVirtual parentId order isChild }

subproject

Fetches a specific folder by its storage key.

Arguments:

  • id: String! - The unique identifier(key) of the subproject. Required

Returns:

Example:


Mutation

createProjectFolder

Creates a project folder.

Arguments:

  • name: String! - Name of new folder.

  • description: String! - The description of new folder.

Returns:

Example:


updateProjectFolder

Edit a project folder.

Arguments:

  • id: String! - Updated Folder storage key.

  • name: String! - New name of project folder.

  • description: String! - New description of project folder.

Returns:

Example:


deleteProjectFolder

Delete a project folder.

Arguments:

  • id: String! - Deleted Folder key.

Returns:

Example:


addSubproject

Adds a subproject to a subproject or project folder.

Arguments:

  • id: String! - The added subproject key. Required

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

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

Returns:

Example:


breakSubprojectHierarchy

Removes a subproject from its parent.

Arguments:

  • id: String! - The removed subproject key. Required

Returns:

  • Successful message.

Example:


Types

Subproject

Represents a subprojects.

Fields:

  • id: String! - The id of the subproject.

  • key: String! - The unique identifier of the subproject.

  • name: String! - Name of the subproject.

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

  • order: String! - Order of subproject on hierarchy.

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


ProjectFolder

Represents a saved project folder.

Fields:

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

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

  • description: String! - The description of the project folder.

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

  • order: String! - Order of subproject on hierarchy.

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

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

Â