Say I have a schema like this:
type Foo {
required link bar -> Bar;
}
type Bar {
required property baz -> bool;
}
How do I, knowing the id of a Foo object, update a property of a Baz object it points to?
In other words, how do I update Foo.bar.baz value knowing Foo's ID?
You can filter based on the backlink like this:
select Bar filter .<bar.id = <uuid>'df492862-80aa-11ed-832e-e72d12452736';
Where df492862-80aa-11ed-832e-e72d12452736 is the ID of your Foo object. That means you can update like this:
update Bar
filter .<bar.id = <uuid>'df492862-80aa-11ed-832e-e72d12452736'
set { baz := false };
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With