Add retireAppDeployment to the public api (#7642)

This commit is contained in:
jdolle 2026-02-05 17:20:22 -08:00 committed by GitHub
parent a0e4bbfa5d
commit a65b0bc772
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 16 deletions

View file

@ -0,0 +1,5 @@
---
'hive': minor
---
Add Mutation.retireAppDeployments to the public API

View file

@ -126,17 +126,32 @@ export default gql`
input: AddDocumentsToAppDeploymentInput!
): AddDocumentsToAppDeploymentResult!
activateAppDeployment(input: ActivateAppDeploymentInput!): ActivateAppDeploymentResult!
retireAppDeployment(input: RetireAppDeploymentInput!): RetireAppDeploymentResult!
retireAppDeployment(
input: RetireAppDeploymentInput! @tag(name: "public")
): RetireAppDeploymentResult! @tag(name: "public")
}
input RetireAppDeploymentInput {
target: TargetReferenceInput
appName: String!
appVersion: String!
"""
Force retirement even if protection rules would prevent it.
If using an organization access token, then a target must be provided.
If using a target's access token, then this should be null.
"""
force: Boolean
target: TargetReferenceInput @tag(name: "public")
"""
The identifying application name
"""
appName: String! @tag(name: "public")
"""
The exact version of the application to retire
"""
appVersion: String! @tag(name: "public")
"""
Force retirement even if protection rules would prevent it. Disabled by default.
"""
force: Boolean! = false @tag(name: "public")
}
"""
@ -146,41 +161,41 @@ export default gql`
"""
The last time the app deployment was used.
"""
lastUsed: DateTime
lastUsed: DateTime @tag(name: "public")
"""
Days since the app deployment was last used.
"""
daysSinceLastUsed: Int
daysSinceLastUsed: Int @tag(name: "public")
"""
Required minimum days of inactivity.
"""
requiredMinDaysInactive: Int!
requiredMinDaysInactive: Int! @tag(name: "public")
"""
Current traffic percentage of this app deployment.
"""
currentTrafficPercentage: Float
currentTrafficPercentage: Float @tag(name: "public")
"""
Maximum traffic percentage allowed for retirement.
"""
maxTrafficPercentage: Float!
maxTrafficPercentage: Float! @tag(name: "public")
}
type RetireAppDeploymentError implements Error {
message: String!
message: String! @tag(name: "public")
"""
Details about why protection prevented retirement.
Only present when retirement was blocked due to protection rules.
"""
protectionDetails: AppDeploymentProtectionBlockDetails
protectionDetails: AppDeploymentProtectionBlockDetails @tag(name: "public")
}
type RetireAppDeploymentOk {
retiredAppDeployment: AppDeployment!
retiredAppDeployment: AppDeployment! @tag(name: "public")
}
type RetireAppDeploymentResult {
error: RetireAppDeploymentError
ok: RetireAppDeploymentOk
error: RetireAppDeploymentError @tag(name: "public")
ok: RetireAppDeploymentOk @tag(name: "public")
}
input CreateAppDeploymentInput {