repositoryOwner null result inconsistent with other fields


#1

If a repository owner is not found the response will return a null value, all other fields return an error when the resource cannot be found. For example:

query { 
  repositoryOwner(login: "awizdjaoidnaiwodnawiond") {
    login
  } 
}

returns

{
  "data": {
    "repositoryOwner": null
  }
}

Whether as the other fields, including for example user:

query { 
  user(login: "awizdjaoidnaiwodnawiond") {
    login
  } 
}

return

{
  "data": {
    "user": null
  },
  "errors": [
    {
      "message": "Could not resolve to a User with the login of 'awizdjaoidnaiwodnawiond'.",
      "locations": [
        {
          "line": 7,
          "column": 2
        }
      ],
      "path": [
        "user"
      ]
    }
  ]
}

Not sure if this is a bug or a feature, if it is by design curious to know the reasoning behind it.


#2

Hi there @msaspence! Thanks for bringing this up with us. While I don’t have an immediate explanation for this, I’ve noted this internally for our engineering team to look at and explore for future iterations. Let us know if you have anything else to report!