I have the following simplified collection with the computed field invitations
.
collection Organization {
name: String
compute invitations: Set<Invitation> | Null = (org => Invitation.all().where(.organization == org))
}
invitations can be Null
or should return
data: Array<Invitation>
after: String?
But if I run an example query Organization.byId("123456")
, that should return null for the computed field invitations, it returns interestingly an after cursor, but no data:
Dashboard:
{
id: "123456",
coll: Organization,
name: "TestCompany",
invitations: "hdWC1YLGakludml0YXRpb26ByoRjYWxsgPT2gcqEZiR3aGVyZYLUgsaDY29yZ/bGYnYwx8yDgWUkdGhpc/bOg9WCxmUkdGhpc4HJgmxvcmdhbml6YXRpb270Yj09xmNvcmfGYnYx9PaCzUoF4iaVyyAA0AQF9vbBghpnxrZ6GjsCM4AQ",
}
If I do the same via the fauna js client it looks like this:
As the field data
is mandatory and the after
cursor can be null/undefined + the fact that the computed value is not returning any documents from Invitations
(As the collection is empty) I’m quite surprised that there is an after
cursor after all.