Return search type or search query string

Is there a way to get back the object type I am searching for in the returned results? The following query

{
  search(type: REPOSITORY, query: "language:python", first:5) {
    nodes {
      ... on Repository {
        nameWithOwner
        id
        }
      }
    }
}

returns a node list. I know by the query these are repositories. But I want to know independent of my query the object type is for each node I encounter in the results.

You can use __typename:

{
  search(type: REPOSITORY, query: "language:python", first:5) {
    nodes {
      id
      __typename
      }
    }
}

Might also be relevant: