RedisGraph / redisgraph-go

A Golang client for redisgraph
https://redisgraph.io
BSD 3-Clause "New" or "Revised" License
132 stars 38 forks source link

Load an existing graph #78

Open Amodio opened 1 year ago

Amodio commented 1 year ago

Hello,

I am using GraphNew() to play with Redis Graph, my problem is that the existing nodes&edges are not loaded in the graph structure. The workaround I have is to read the graph (nodes + edges), delete the graph and add these back inside, then do my work.

As mentioned in the doc, Commit() rebuilds an entire Graph so I can use it only once. Is there any better solution?

swilly22 commented 1 year ago

That's a good point. At the moment creating a Graph object against an already existing graph key won't populate the client-side object, one will have to fetch the data and construct manually.