MichelDiz
(Michel Diz)
February 10, 2021, 10:42pm
3
That’s how it works. There are two Facets tickets to change this behavior. But until there you have to deal with these modifications on your end, and send the solved part in the update mutation.
Here follows some tickets related
Moved from GitHub dgraph/1996
Posted by willcj33 :
Currently, if I write a facet like so <n1> <pred> <n2> (fromMerge:true) . and then afterwards, another process “upserts” the same two nodes and edge like so <n1> <pred> <n2> ., the fromMerge boolean facet is removed.
If I don’t alter the facets in any way, would it make sense to not delete them? It would make managing edge facets easier on us, or at least allow an option to NOT overwrite the current facets.
This is currently an issue for us b…
Moved from GitHub dgraph/4520
Posted by ChStark :
What you wanted to do
If we have an upsert block like:
upsert{
query{
product( func: uid( 0x12a4f4e ) ){
wholesale_price as product.wholesale_price
wholesale_tax as product.wholesale_tax
regular_price as product.regular_price
regular_tax as product.regular_tax
}
user( func: uid( 0x12a4f31 ) ){
is_wholesaler as user.is_wholesaler
}
}
mutation @if( eq( val(is_wholesaler) , true ) ){
set{
…
Moved from GitHub dgraph/4787
Posted by hackintoshrao :
What version of Dgraph are you using?
Dgraph v1.1
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
NA
Steps to reproduce the issue (command/config used to run Dgraph).
Create multiple facets for the same predicate and try to selectively update or delete one of them.
Expected behaviour and actual result.
Currently, when you have multiple facets for a given predicate, it’s not possib…
Cuz first you have to save the facets values on your end, and then add those values and the new one in the upsert. That’s the only way for now.
Sorry, there isn’t enough demand on Facets. So several other tickets with higher priority obfuscate it.