Let's consider a type that contains two relations that allows for one to be related to the other and the otherwise around is true as well.
type Item {
name: String! @unique
parent: Item @relation(name: "ItemOnItem")
children: [Item!]! @relation(name: "ItemOnItem")
}
I am creating those two Item
with those mutations:
mutation {
createItem( data: { name: "parent" } )
} {
name
parent { name }
children { name }
}
mutation {
createItem(
data: {
name: "child"
parent: { connect: { name: "parent" } }
}
)
} {
name
parent { name }
children { name }
}
Current behavior
{
"data": {
"items": [
{
"name": "parent",
"parent": null,
"children": []
},
{
"name": "child",
"parent": {
"name": "parent"
},
"children": [
{
"name": "parent"
}
]
},
]
}
}
Expected behavior?
{
"data": {
"items": [
{
"name": "parent",
"parent": null,
"children": [
{
"name": "child"
}
]
},
{
"name": "child",
"parent": {
"name": "parent"
},
"children": []
},
]
}
}
Anyone else can confirm this issue?
Thanks for reporting this and the detailed description @canercandan
The issue is now fixed on the unstable channel und should be released to the stable channel later today.
@do4gr amazing :raised_hands: thanks
This is now available in 1.4.0
馃檪
Most helpful comment
Thanks for reporting this and the detailed description @canercandan
The issue is now fixed on the unstable channel und should be released to the stable channel later today.