Create environment

createEnvironment(input: CreateEnvironmentInput!): CreateEnvironmentPayload

Requires project.environments.manage.

Arguments

ArgumentTypeRequired
inputCreateEnvironmentInput!Yes

Input fields

input

CreateEnvironmentInput

FieldTypeRequired
projectReferenceStringNo
nameString!Yes

Response

Returns CreateEnvironmentPayload. Open the type for its fields and nested types.

FieldType
environmentEnvironment
errorString

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateEnvironment($input: CreateEnvironmentInput!) {
  createEnvironment(input: $input) {
    error
  }
}
json
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001",
    "name": "example"
  }
}