Refactoring nodes in Bloom

Hi,

I want to use Bloom to clean up duplicates visually and via a UI. I have setup the following Scene Action under the name of "Merge Nodes"

CALL apoc.refactor.mergeNodes($nodes,{
  properties:"combine",
  mergeRels:true
})
YIELD node
return node

When I select two nodes, and then click on "Scene Actions" -> "Merge nodes", the nodes are not merged, instead, I get an error message saying "Sorry, we couldn't find any results for this action., Scene Action could not be completed due to an error."

There is probably some limitation of Scene Actions that I am not aware of. However, it would definitively be nice if it was possible to use Bloom for interactive refactoring of the graph.

Maybe scene action queries are read-only, which would make sense.

I am not sure that is the case.
I notice in crafting scene actions there is a check box for "Write transaction". Additionally I have crafted some that do a write albeit a simple set property command.

For writing scene actions the recommended flow is to use a match statement followed by a where clause

Match (n)
where id(n) in $Nodes

The documentation for refractor shows examples with those nodes further collected and modified with head

MATCH (a1:Person{name:'John'}), (a2:Person {name:'Tom'})
WITH head(collect([a1,a2])) as nodes
CALL apoc.refactor.mergeNodes(nodes,{
  properties:"combine",
  mergeRels:true
})
YIELD node
RETURN node;

Andy

Thank you Andy! I tried both variants:

WITH head($nodes) as nodes
CALL apoc.refactor.mergeNodes(nodes,{
  properties:"combine",
  mergeRels:true
}) YIELD node
RETURN node;

and

Match (n) where id(n) in $nodes
with collect(n) as nodes
CALL apoc.refactor.mergeNodes(nodes,{
  properties:"combine",
  mergeRels:true
}) YIELD node
RETURN node;

Unfortunately, it produced the same error message.

Thanks. It is possible to both create and delete nodes, as well as to create relationships interactively in Bloom, so there is at least some support for mutating the graph - but if this is not a bug there should be some documentation on what kind of write operation is allowed and which isn't.

Maybe this is relevant: Change label of virtual node works in browser but not in bloom scene action - #2 by cboulanger - it is about mutating virtual nodes, but maybe "read access mode" is the key here.