Skip to content

Add `archived` argument to projects GraphQL query

Peter Hegman requested to merge add-fields-to-project-graphql-query into master

What does this MR do and why?

This MR adds an archived argument to the Query.projects GraphQL query. This is needed for Migrate Your Work > Projects list to Vue and mo... (&13066) where we will be displaying archived and projects pending deletion in the Inactive tab and will be excluding them from other tabs.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

INCLUDE

Screenshot_2024-08-09_at_5.13.49_PM

EXCLUDE

Screenshot_2024-08-09_at_5.13.07_PM

ONLY

Screenshot_2024-08-09_at_5.15.52_PM

How to set up and validate locally

  1. Find a project and go to Settings -> General -> Advanced
  2. Click Archive project
  3. Go to http://gdk.test:3000/-/graphql-explorer
  4. Run the following queries

INCLUDE

query Projects {
  projects(archived: INCLUDE) {
    nodes {
      nameWithNamespace
      archived
    }
  }
}

EXCLUDE

query Projects {
  projects(archived: EXCLUDE) {
    nodes {
      nameWithNamespace
      archived
    }
  }
}

ONLY

query Projects {
  projects(archived: ONLY) {
    nodes {
      nameWithNamespace
      archived
    }
  }
}
Edited by Peter Hegman

Merge request reports

Loading