Not found branches should not error full query

I am having an issue when querying information from various branches. For example, consider the following call

query Commits($nodes: [ID!]!) {
  nodes(ids: $nodes) {
    ... on Ref {
      target {
        ... on Commit {
          history {
            totalCount
          }
        }
      }
    }
  }
}

if I try with it with the following variables

{"nodes": ["MDM6UmVmODMzNDM4MjI6cmVmcy9oZWFkcy9tYXN0ZXI=", "MDM6UmVmMzU4OTM0NjI6cmVmcy9oZWFkcy9tYXN0ZXI="]}

I get

{
  "errors": [
    {
      "message": "Something went wrong while executing your query. Please include `EBF6:2085:A6F71DD:113FB807:5FAC3578` when reporting this issue."
    }
  ]
}

While eliminating the first works fine.

{
  "data": {
    "nodes": [
      {
        "target": {
          "history": {
            "totalCount": 5
          }
        }
      }
    ]
  }
}

This occurs when the branch ID used to be available but it is no longer (the repository was deleted or made private). The ID have not been linked before it gives the expected behavior.

{"nodes": ["", "MDM6UmVmMzU4OTM0NjI6cmVmcy9oZWFkcy9tYXN0ZXI="]}

yielding

{
  "data": {
    "nodes": [
      null,
      [
        [
          "target",
          [
            [
              "history",
              [
                [
                  "totalCount",
                  5
                ]
              ]
            ]
          ]
        ]
      ]
    ]
  },
  "errors": [
    {
      "type": "NOT_FOUND",
      "path": [
        "nodes",
        0
      ],
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "message": "Could not resolve to a node with the global id of ''"
    }
  ]
}

The inconsistency currently makes it potentially dangerous. A nice fix would be to identify the cases then the branch ID exists/existed but is not available and give a null / NOT_FOUND error for that node.