Oh cool,
figured it out. Thx for the answers!
upsert {
query {
var (func: type("bottle")) {
A as bottleID
uid
},
caps(func: type("cap"), orderasc: bottleID)@filter(eq(bottleID,val(A))) {
B as bottleID
C as uid
},
bottles(func: type("bottle"), orderasc: bottleID) @filter(eq(bottleID,val(B))){
bottleID
D as uid
}
}
mutation {
set {
uid(D) <test> uid(C) .
}
}
}
I’ll do a performance test,
currently I add 100 elements at once, and link them afterwards.
Maybe I’ll try to do this with an upsert at first, when inserting the cap, look for the bottle, and vice versa.