Skip to content

Added count in project_type

Suraj Tripathi requested to merge issue_346364_count_for_project_types into master

What does this MR do and why?

Adds count to ProjectType for showing number of pages on UI pagination

Refs: https://gitlab.com/gitlab-org/gitlab/-/issues/346364

Screenshots or screen recordings

  1. Verify that count isn't present for Projects on master branch Screenshot_2022-06-01_at_6.16.44_PM

  2. Verify count is present for Projects with the changes Screenshot_2022-06-01_at_6.16.11_PM

How to set up and validate locally

  1. Validate GraphQL projects have count in them, visit http://127.0.0.1:3000/-/graphql-explorer and use the following query
{
  projects {
    count
    edges {
      node {
        id
      }
    }
  }
}
  1. Validate that count isn't resulting in an Error
  2. Check for a valid response
{
  "data": {
    "projects": {
      "count": 2,
      "edges": [
        {
          "node": {
            "id": "gid://gitlab/Project/21"
          }
        },
        {
          "node": {
            "id": "gid://gitlab/Project/20"
          }
        }
      ]
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports