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

Adding Edges to previously created Nodes #73

Open
tom342178 opened this issue Jul 22, 2022 · 1 comment
Open

Adding Edges to previously created Nodes #73

tom342178 opened this issue Jul 22, 2022 · 1 comment
Labels
question Further information is requested

Comments

@tom342178
Copy link

I am updating the graph from a stream of input data. I am updating the Nodes separately from the Edges.

From what I can see, the supported pattern is that I add the nodes and the edges that connect the nodes in the same commit. I did not see a way to create a node then at a later time add an edge to a node that had already been committed without adding the node to the Node map first. If I do that, it appears as though the node would be pushed to redis again.

Am I correct?

@LiorKogan LiorKogan added the question Further information is requested label Jul 22, 2022
@LiorKogan
Copy link
Member

Let's first create two nodes:

graph.query g "create (x1 {n:1})"
graph.query g "create (x2 {n:2})"

Now, let's find these nodes and connect them with a new relationship:

graph.query g "match (x1 {n:1}), (x2 {n:2}) merge (x1)-[r:R]->(x2) return x1,r,x2"

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

No branches or pull requests

2 participants