/
Subproject GraphQL Operations

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:

query { subproject(id: "subproject-1234-2") { id key name isVirtual parentId order isChild }

Mutation

createProjectFolder

Creates a project folder.

Arguments:

  • name: String! - Name of new folder.

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

Returns:

Example:

mutation { createProjectFolder ( name: "Software Projects" description: "Mobile software projects" ) { id key order name parentId description isVirtual } }

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:

mutation { updateProjectFolder ( id: "projectFolder-123ae2e3-123dgwas-1.8" name: "Hardware Projects" description: "Hardware projects for mobile phones" ) { id key name order parentId description } }

deleteProjectFolder

Delete a project folder.

Arguments:

  • id: String! - Deleted Folder key.

Returns:

Example:

mutation { deleteFolder ( id: "projectFolder-f334af77-8862-4d38-9df0-3efc5356fc7c-1.5" ) { id name order parentId description } }

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:

mutation { addSubproject( id: "projectFolder-0f2b5392-1ea5-4635-a8e9-4db508875626-6", parentId: "projectFolder-834ccd1b-d334-42c1-accf-898d340b369b-1" isVirtual: true ) { id name isChild } }

breakSubprojectHierarchy

Removes a subproject from its parent.

Arguments:

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

Returns:

  • Successful message.

Example:

mutation { breakSubprojectHierarchy ( id: "projectFolder-28899344-b42d-49e0-83cb-dbde9525bdf9-1" ) { id name } }

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.