forkEnvironment
Create a new environment by forking an existing one.
The new environment is linked to the parent via its parent field. Instances
are initialized from the project's components and seeded with the parent's
instance params. By default, secrets and remote references are not copied
— set copySecrets / copyRemoteReferences to fan the equivalent
copyInstance behavior across every package in one call. Pass
copyEnvironmentDefaults: true to also copy the parent's default resource
connections.
Re-calling forkEnvironment with the same parent + id is a no-op that
returns the existing environment. Re-calling with the same id but a
different parentId is rejected — a fork's parent is immutable.
forkEnvironment(
organizationId: ID!
parentId: ID!
input: ForkEnvironmentInput!
): EnvironmentPayload
Form Schema
This mutation supports dynamic form generation using JSON Schema.
Loading schema...
Arguments
forkEnvironment.organizationId ● ID! non-null scalar {#organization-id}
Your organization's unique identifier.
forkEnvironment.parentId ● ID! non-null scalar {#parent-id}
The identifier of the environment to fork from.
forkEnvironment.input ● ForkEnvironmentInput! non-null input {#input}
Create or update a fork of an existing environment.