11.4. Creating Data

CALL apoc.create.node(['Label'], {key:value,…​})

create node with dynamic labels

CALL apoc.create.nodes(['Label'], [{key:value,…​}])

create multiple nodes with dynamic labels

CALL apoc.create.addLabels( [node,id,ids,nodes], ['Label',…​])

adds the given labels to the node or nodes

CALL apoc.create.removeLabels( [node,id,ids,nodes], ['Label',…​])

removes the given labels from the node or nodes

CALL apoc.create.setProperty( [node,id,ids,nodes], key, value)

sets the given property on the node(s)

CALL apoc.create.setProperties( [node,id,ids,nodes], [keys], [values])

sets the given property on the nodes(s)

CALL apoc.create.setRelProperty( [rel,id,ids,rels], key, value)

sets the given property on the relationship(s)

CALL apoc.create.setRelProperties( [rel,id,ids,rels], [keys], [values])

sets the given property on the relationship(s)

CALL apoc.create.relationship(person1,'KNOWS',{key:value,…​}, person2)

create relationship with dynamic rel-type

CALL apoc.create.uuids(count) YIELD uuid, row

creates count UUIDs

CALL apoc.nodes.link([nodes],'REL_TYPE')

creates a linked list of nodes from first to last