Merge all nodes with the same property name (case insensitive)

Hi there,
Our graph db contains a unique index for name field. But there are a lot of duplicates because we didn't normalize data earlier.

Can we merge this duplicate nodes if their name's are matching (case insensitively)?

Apoc has the function you're after - http://neo4j-contrib.github.io/neo4j-apoc-procedures/3.5/graph-refactoring/merge-nodes/

You can merge a list of nodes onto the first one in the list.

All relationships are merged onto that node too. You can specify the merge behavior for properties globally and/or individually.

To run it in a case-insensitive way, you might try combining this with the toUpper or toLower string functions - https://neo4j.com/docs/cypher-manual/current/functions/string/