I’ve got the following GraphQL schema uploaded to my FaunaDB:
type RSheet @collection(name: "sheets") {
columns: [RColumn!]! @relation
sections: [RSection]!
}
type RColumn @collection(name: "columns") {
label: String!
sheet: RSheet!
}
type RSection @embedded {
label: String
items: [[RItem!]]!
}
type RItem @embedded {
value: String
form: RItemForm
column: RColumn!
}
enum RItemForm {
STRING
}
That is a sheet with columns and a number of sections with items that make the rows of a table.
Now, I’ve created a sheet as well as two columns.
“sheets” collection in the database
{
"ref": Ref(Collection("sheets"), "304268724760740364"),
"sections": [
{
"label": null,
"items": []
}
]
}
“columns” collection in the database
{
"ref": Ref(Collection("columns"), "304268724764934668"),
"label": "Begin",
"sheet": Ref(Collection("sheets"), "304268724760740364")
},
{
"ref": Ref(Collection("columns"), "304268724776469004"),
"label": "End",
"sheet": Ref(Collection("sheets"), "304268724760740364")
}
All this works fine so far. I can create sheets and/or columns, update, and delete them.
However, if I want to add a section item using FaunaDB’s GraphQL I can’t connect the item’s columns. I get an error stating that I have to provide the column’s ID!:
When I do so, only the ID is written to the database and a connection Ref(…) is not created:
“sheets” collection in the database
{
"ref": Ref(Collection("sheets"), "304268724760740364"),
"sections": [
label: null
{
"items": [
[
{
"value": "Item 1",
"column": "304268724791149068" /// EXPECTED: Ref(Collection("columns"), "304268724791149068")
}
]
]
}
]
}
What am I missing?


