Update environment

updateEnvironment(input: UpdateEnvironmentInput!): UpdateEnvironmentPayload

Requires project.environments.manage.

Arguments

ArgumentTypeRequired
inputUpdateEnvironmentInput!Yes

Input fields

input

UpdateEnvironmentInput

FieldTypeRequiredDescription
idID!Yes
nameStringNo
variables[EnvironmentVariableInput!]NoAtomic variable upserts in this environment. Existing keys retain their IDs; omitted keys remain unchanged and returned values are masked. A non-empty list also requires project.env_vars.write.
protectedBooleanNo

Response

Returns UpdateEnvironmentPayload. 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 UpdateEnvironment($input: UpdateEnvironmentInput!) {
  updateEnvironment(input: $input) {
    error
  }
}
json
{
  "input": {
    "id": "00000000-0000-4000-8000-000000000001"
  }
}