Skip to content

Add UserStarredProjectsResolver sort argument

What does this MR do and why?

Add UserStarredProjectsResolver sort argument

Related to issue: #450693

How to set up and validate locally

  1. Star a few projects
  2. Visit http://127.0.0.1:3000/-/graphql-explorer
  3. Test the query below. Try using name_asc, name_desc, id_asc, ... as the sort argument and the return response projects should be sorted accordingly:
query GetUserStarredProjects($username: String, $sort: String) {
  user(username: $username) {
    id
    username
    name
    starredProjects(sort: $sort) {
      nodes {
        id
        name
        description
        starCount
        createdAt
        updatedAt
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
    }
  }
}
Edited by Justin Zeng

Merge request reports