neo4j-labs / arrows.app

A graph drawing application
https://arrows.app
Apache License 2.0
106 stars 16 forks source link

Nested properties #67

Open lgs85 opened 1 year ago

lgs85 commented 1 year ago

Thanks to all for your great work on this. I really like the JSON export function, and one thing that would make it even more useful would be to able to export graphs in JSON format with nested properties. For instance, I can create a node with the following properties:

"properties": {
  "name.fullname": "Tom Hanks",
  "name.forename": "Tom",
  "name.surname": "Hanks",
  "type": "person"
}

What I'd love to be able to do is generate something like:

"properties": {
  "name":{
      "fullname": "Tom Hanks",
      "forename": "Tom",
      "surname": "Hanks"
    },
  "type": "person"
}

Is this something that is planned, or would be easy to develop? Thanks!

akollegger commented 1 year ago

Arrows was designed to draw graphs that are a subset of Neo4j's property graph model -- particularly that the properties can only be strings. Those properties have a particular role within a diagram.

Limiting drawings to the physical data model of Neo4j misses logical and conceptual aspects. Arrows should be able to draw richer graphs, both structurally and with more detail. For example, It should be able to draw paths. And, yes, I think nested properties make sense from this view.

For nested properties, we'd first design how nested properties could be presented in the diagram. This should be done while also considering arrays, whether they can be combined, and how deep a structure should be accommodated.

Then we'd implement the simplest case, which is probably exactly what you've asked for. :)

-ABK