diff --git a/.changeset/wise-seals-type.md b/.changeset/wise-seals-type.md new file mode 100644 index 000000000..ff7dcac3c --- /dev/null +++ b/.changeset/wise-seals-type.md @@ -0,0 +1,5 @@ +--- +'hive': minor +--- + +Add Mutation.retireAppDeployments to the public API diff --git a/packages/services/api/src/modules/app-deployments/module.graphql.ts b/packages/services/api/src/modules/app-deployments/module.graphql.ts index 0efbf6e2c..8624661a7 100644 --- a/packages/services/api/src/modules/app-deployments/module.graphql.ts +++ b/packages/services/api/src/modules/app-deployments/module.graphql.ts @@ -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 {