There is one document in the Ranking collection.
I have addressed similar issues before, however, this one is slightly different since I get the error with Basic authorization unlike here and I’m already selecting ‘data’ unlike here.
The error:
"message": "Cannot return null for non-nullable type (line 3, column 5):\n active\n ^",
the function FQL:
{
name: "all_rankings",
role: null,
body: Query(
Lambda(
[],
Select(
"data",
Map(Paginate(Match(Index("allRankings"))), Lambda("x", Get(Var("x"))))
)
)
)
}
the index:
{
name: "allRankings",
unique: false,
serialized: true,
source: "Ranking"
}
the query in PG:
query AllRankings {
allRankings {
active
rankingname
rankingownerid
}
}
the relevant schema bits:
type Ranking
{
active : Boolean!
rankingname : String!
rankingdesc : String
rankingownerid : String!
}
allRankings: [Ranking] @resolver(name: "all_rankings")
- Why do I get ‘Cannot return null for non-nullable type’ error?
- What can I do to fix?
Thanks …