diff --git a/packages/gql-client/src/client.ts b/packages/gql-client/src/client.ts index 74c7683e..f238869e 100644 --- a/packages/gql-client/src/client.ts +++ b/packages/gql-client/src/client.ts @@ -276,6 +276,17 @@ export class GQLClient { return data; } + async deleteDeployment (deploymentId: string): Promise { + const { data } = await this.client.mutate({ + mutation: mutations.deleteDeployment, + variables: { + deploymentId + } + }); + + return data; + } + async addDomain (projectId: string, data: types.AddDomainInput): Promise { const result = await this.client.mutate({ mutation: mutations.addDomain, diff --git a/packages/gql-client/src/mutations.ts b/packages/gql-client/src/mutations.ts index fd7a9c2e..be8d96d9 100644 --- a/packages/gql-client/src/mutations.ts +++ b/packages/gql-client/src/mutations.ts @@ -82,6 +82,12 @@ mutation ($projectId: String! ,$deploymentId: String!) { } `; +export const deleteDeployment = gql` +mutation ($deploymentId: String!) { + deleteDeployment(deploymentId: $deploymentId) +} +`; + export const addDomain = gql` mutation ($projectId: String!, $data: AddDomainInput!) { addDomain(projectId: $projectId, data: $data) diff --git a/packages/gql-client/src/types.ts b/packages/gql-client/src/types.ts index 71c44c00..786b7519 100644 --- a/packages/gql-client/src/types.ts +++ b/packages/gql-client/src/types.ts @@ -269,6 +269,10 @@ export type RollbackDeploymentResponse = { rollbackDeployment: boolean } +export type DeleteDeploymentResponse = { + deleteDeployment: boolean +} + export type AddDomainInput = { name: string }