GraphQL: CiRunner.projects sort order is not respected

Summary

Steps to reproduce

  1. Go to the shell in your GDK gitlab directory and run bundle exec rake 'gitlab:seed:runner_fleet[root, rf5-, 10, 400]'. This will seed your GDK with some projects and runners required for testing this MR.

  2. Go to http://gdk.test:3000/-/graphql-explorer and execute the following query:

    {
      project(
        fullPath: "rf5-top-level-group-1/rf5-group-1.1/rf5-group-1.1.1/rf5-project-1-1-1-1"
      ) {
        runners(type: PROJECT_TYPE) {
          nodes {
            id
            projectCount
            projects(search: "rf5-", sort: "id_desc") {
              nodes {
                id
                fullPath
              }
            }
          }
        }
      }
    }

Example Project

To create the data required to run the query above, go to the shell in your GDK gitlab directory and run bundle exec rake 'gitlab:seed:runner_fleet[root, rf5-, 10, 400]'. This will seed your GDK with some projects and runners.

What is the current bug behavior?

The projects are always returned in :id_asc sort order.

What is the expected correct behavior?

They should be returned in the requested order.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes