Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResultSet parse to Tree Struct #101

Open
dwgeneral opened this issue Jan 13, 2021 · 1 comment
Open

ResultSet parse to Tree Struct #101

dwgeneral opened this issue Jan 13, 2021 · 1 comment

Comments

@dwgeneral
Copy link

dwgeneral commented Jan 13, 2021

I have some entities in my graph, such as Device which is own of an Organization, Software which is installed on a Device, etc

Screen Shot 2021-01-13 at 3 14 17 PM
Screen Shot 2021-01-13 at 2 56 35 PM

when I query by "MATCH p = (o:Organization) - [*] - (s) return o as primary, s as target, nodes(p) as nodes, relationships(p) as edges' cypher sql,

finally, I want to get a tree struct like this, maybe like graphQL result.

GraphNode: {
	id: "org1",
	label: "Organization",
	property: {
		name: 'apple',
                 ...
	},
	children: [
	        GraphNode2,
		{
                    id: "dev01",
                    label: "Device",
                    property: {
                       name: 'dev01',
                       .....
                   }
                   children: [
                        GraphNode4
                   ]
                }
              ....
	]
}

does anyone have same work? or some suggestions? thx

@swilly22
Copy link
Contributor

I think you'll be able to restructure your result-set in a JSON fashion once the map data structure will be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants