Cannot return null for non-nullable field StargazerEdge.node


I got this error executing the following query:


  repository(owner: "EbookFoundation", name:"free-programming-books") {
    stargazers(first: 100, orderBy: { field: STARRED_AT, direction: DESC }, after: "Y3Vyc29yOnYyOpK5MjAxNS0wOC0wNVQyMTowNDoxMi0wMzowMM4CbjGx" ) {
      pageInfo {
      edges {
        node {

Error message:

  "data": null,
  "errors": [
      "message": "Cannot return null for non-nullable field StargazerEdge.node"

Cannot return null for non-nullable field ReviewRequestedEvent.subject

I get this same error for freeCodeCamp/freeCodeCamp and twbs/bootstrap.
Seems to be something related to the User.


I get the same error when I copy/paste your query on EbookFoundation, but I’m unable to reproduce it with freecodecamp or bootstrap. Do you have to paginate for a while before it hits the error?


Yes, I do have to paginate a while.
I don’t how exactly where, but I can say that this error occur in other repositories too.


:wave: @hsborges,

I suspect that this is the same problem that you’ve reported in Sort freeCodeCamp ascending throws a server error. I think once we solve that one, this will be resolved. I’ve added this to our internal tracker to investigate. Thank you for reporting.


@bswinnerton I still having this problem, even with the other problem solved.
Unfortunately, I get this error in different repos.
For example, for owner “angular”, repo “angular-seed”, and “after”:“Y3Vyc29yOnYyOpO5MjAxNS0wNy0yNFQwMTowNjozNi0wMzowMADOAmRSbg==”.


Hi @hsborges, thanks for reporting that issue on another repo! Let me take a look, perhaps something else is not quite right :grimacing:


Hi @rmosolgo , I did some research on this error and found the following situation:

For the repository ccgus/fmdb, I get the same error, specifically, for the cursor “Y3Vyc29yOnYyOpO5MjAxMy0wOS0xNFQwMDowNDoyMS0wMzowMADOAOkGeQ==”.
This star was given on “2013-09-14T03:04:21.000Z” and by using the API v3 I found the following record:

  "starred_at": "2013-09-14T03:04:21Z",
  "user": {
    "login": "ghost",
    "id": 10137,
    "type": "User"

Accessing the web profile, it seems to be a “fake” profile that links deleted users.
My question is: Why do not link deleted users to this specific users on v4 too?

Additional information:

Same situation for:
haoel/leetcode (cursor “Y3Vyc29yOnYyOpO5MjAxNC0xMC0yMFQxNDo1MjoxMS0wMjowMADOAaMILA==”)
code4craft/webmagic (“Y3Vyc29yOnYyOpO5MjAxNC0wOS0yM1QwMToyMzo0My0wMzowMADOAZPAuA==”)
Leaflet/Leaflet (“Y3Vyc29yOnYyOpO5MjAxNC0xMi0yN1QwOToyNjo0Ni0wMjowMADOAcuYAw==”)
code4craft/webmagic (“Y3Vyc29yOnYyOpO5MjAxNC0wOS0yM1QwMToyMzo0My0wMzowMADOAZPAuA==”)
(and some others)


Hi, thanks for digging deeper on that! We’ve identified the invalid data but I’m just trying to find an appropriate time to run the cleanup task.

We’re trying not to use ghost for the GraphQL API, but instead, find and resolve invalid data issues like this one!


Hi @hsborges, I’ve just run the necessary data task and these queries are looking good for me, please let me know if you see this error again and thanks for reporting the issue!