Graphql repository query fails to redirect in some cases

As per Inconsistent handling of moved repositories using API v4 the repository query is supposed to redirect when a repo has been moved. Indeed the examples in that thread do work, however I have an example that does not work.

https://github.com/airkro/nice-move ā†’ https://github.com/nice-move/nice-move

The redirect does work when accessing from a browser or from the v3 api, however it does not work from the graphql api

query {
  repository(owner: "airkro", name: "nice-move") {
    nameWithOwner
  }
}

produces:

{
  "data": {
    "repository": null
  },
  "errors": [
    {
      "type": "NOT_FOUND",
      "path": [
        "repository"
      ],
      "locations": [
        {
          "line": 7,
          "column": 3
        }
      ],
      "message": "Could not resolve to a Repository with the name 'airkro/nice-move'."
    }
  ]
}

Is encourage you to file a bug:

https://support.github.com

Iā€™m getting the same error with novelcovid/api which should redirect to disease-sh/API. Tried this both with the JS client (from multiple APIs with different auth statuses) and the api explorer.

@canuckjacq tagging someone in staff, apologies if this is not the right way to do it, but I could not find a way to file a bug from the link above :frowning:

@jsoref Thanks, I have no raised a support ticket. FWIW, it is very unclear if this is the right way to report a bug. All you get is Contact Support with a free text field.

Github support said that this is failing as the case is incorrect. In my example it should be https://github.com/Airkro/nice-move which will load correctly in the graphql api.

I have suggested that this is a bug as in reality org / repo names are case insensitive, and the graphql api should be case insensitive like the web interface and the v3 api.

1 Like

GitHub support notified me that it is fixed. This is now working for me :partying_face:

2 Likes