Environment Tree
Environments are organised in a parent-child hierarchy, forming a tree structure rooted at the master environment. This tree is useful for visualising lineage, understanding which environments were branched from where, and planning merge strategies.

Tree Structure
Section titled “Tree Structure”Each environment node contains the following information:
- Name: The environment identifier (e.g.,
master,staging,feature-auth). - Status: The current lifecycle state (
active,branching,merging,error,archived). - Parent: The environment this branch was created from.
- Branch Mode: Whether the branch was created as
full(schema + data) orsystem(schema only). - Branched At: The timestamp when this environment was created.
- Children: A list of environments that were branched from this one.
GraphQL API
Section titled “GraphQL API”Query: environmentTree
Section titled “Query: environmentTree”query EnvironmentTree($projectId: String!) { environmentTree(projectId: $projectId) { success message tree { environment { id name status parentName branchMode branchedAt } children { environment { id name status parentName branchMode branchedAt } children { environment { id name status } } } } }}Query: projectEnvironments
Section titled “Query: projectEnvironments”To retrieve a flat list of all environments (without tree nesting):
query GetProjectEnvironments($projectId: String!) { projectEnvironments(projectId: $projectId) { success message environments { id name parentId parentName branchMode branchedAt status createdAt updatedAt } }}Environment Status Lifecycle
Section titled “Environment Status Lifecycle”| Status | Description |
|---|---|
active | The environment is fully operational and available for use |
branching | The environment is being created (database cloning in progress) |
merging | A merge operation is being applied to this environment |
error | An operation failed; the environment may be in an inconsistent state |
archived | The environment has been soft-deleted but its data is preserved |