GraphQL not identifying renamed repos, not providing redirection context

I’m trying to convert some of our REST api calls over to GraphQL calls, but I am seeing some discrepancies in how GraphQL handles, or doesnt handle redirection.  With the older REST APIs when I would issue a request for Pull Request details given the older repo name I would get a 301 status indicating that the repo had been relocated and I could then reissue the request to the new location or using the new repo name.  However, with the GraphQL APIs, I get a 200 status and the only error details I get are that the repository is not found.

Original Repo: https://github.myEnterprise.com/MyOrganization/advanced-worklist-filtering

Renamed Repo: https://github.myEnterprise.com/MyOrganization/worklist-filtering

Was this a conscious decision, something that hasn’t been ported over or a miss in the information provided in the GraphQL response.  Any help would be appreciated.

Hi @sdlf2b,

My apologies for the delay, I’ve just noticed I’ve replied on a different thread :facepalm: If this request is for an enterprise instance we would need you to please contact us at https://github.com/contact with the info so we can look into that further. Otherwise, the below steps should resolve your issue!

For the GraphQL API v4 for GitHub.com, fetching a repository’s previous name will resolve to the new name automatically.

For example, https://github.com/gojuno/mainframer will redirect to https://github.com/buildfoundation/mainframer.

Fetching gojuno/mainframer in the GraphQL Explorer will resolve to the updated name:

query{
repository(owner:"gojuno",name:"mainframer") {
nameWithOwner }
}