Skip to content

Add PagesDeployment to deletePagesDeployment Mutation

What does this MR do and why?

This commit adds the deleted PagesDeployment as a field to the deletePagesDeployment mutation

This will allow the frontend to update the deployments state in the apollo cache.

MR acceptance checklist

How to set up and validate locally

  1. Set up your GDK to support Runners and Pages
  2. Create a Pages project, by creating a new project with the "pages/Plain HTML" template within a group
  3. ensure the pipeline runs so that a pages deployment is created.
  4. obtain the deployment's global ID with the following Graphql Query:
query GetNamespacePagesDeployments {
  namespace(fullPath: "<PATH OF THE GROUP>") {
    pagesDeployments {
      nodes {
        id
        active # this should be true
      }
    }
  }
}
  1. Now run the below mutation:
mutation DeletePagesDeployment {
  deletePagesDeployment(input: { id: "<PAGES_DEPLOYMENT_GLOBAL_ID>" }) {
    pagesDeployment {
      id
      active
      deletedAt
    }
    errors
  }
}
  1. You should now see the "active" property of the deployment as "false" and a value for the "deletedAt" property

Merge request reports