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

Graph mutations? #19

Open
j6k4m8 opened this issue Dec 12, 2022 · 5 comments
Open

Graph mutations? #19

j6k4m8 opened this issue Dec 12, 2022 · 5 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@j6k4m8
Copy link
Member

j6k4m8 commented Dec 12, 2022

Graph mutations (updating, deleting, and creating vertices using Cypher) are a big engineering change, and will likely require a lot of corner-case tests.

I previously listed this as a "not-planned" feature but I wonder if users are interested in this capability existing? Perhaps @khoale88, I wonder what your current use-cases look like? I would be interested in adding this feature back into the roadmap if it will be useful!

@j6k4m8 j6k4m8 added enhancement New feature or request question Further information is requested labels Dec 12, 2022
@khoale88
Copy link
Contributor

It's really nice to have graph mutation. It can be done in the future as long as I can keep up the interest:)). I think it's better for the time being to focus on graph exploration by adding aggregation keywords.

Anw, your repo is hard to find on Google. Some keywords like python, networkx, cypher, neo4j ain't enough. I think some SEO techniques may work, or an article, medium perhaps, can help to promote the work and attract more contributors. What do you think?

@j6k4m8
Copy link
Member Author

j6k4m8 commented Dec 13, 2022

It can be done in the future as long as I can keep up the interest:)). I think it's better for the time being to focus on graph exploration by adding aggregation keywords.

Super awesome :) I totally agree!

I think some SEO techniques may work, or an article, medium perhaps, can help to promote the work and attract more contributors. What do you think?

Definitely! I haven't had the time before to write anything about this tool, but I would love to write something; are you interested in writing something? Maybe we can write a post together?

@khoale88
Copy link
Contributor

khoale88 commented Dec 13, 2022

Definitely! I haven't had the time before to write anything about this tool, but I would love to write something; are you Interested in writing something? Maybe we can write a post together?

I'm not good at writing though, but I can try. We can wait a little more for a better MVP or we can start with something that works first.

@dustyatx
Copy link

I see this thread has gone silent.. does this mean that I'd need to do a complete rebuild of my graph in order to handle mutations?

@j6k4m8
Copy link
Member Author

j6k4m8 commented Feb 19, 2024

hey @dustyatx! We definitely don't require a rebuild of the graph to handle mutations; we just don't support it in the Cypher implementation yet (though I'd say it's still on the roadmap!).

For example, this works:

#!pip3 install grand-cypher networkx
import networkx as nx
from grandcypher import GrandCypher

# Create the network:
network = nx.DiGraph()
network.add_edge("A", "B")
network.add_node("A", username="@j6k4m8")
network.add_node("B", username="@dustyatx")

# Run a query:
print(GrandCypher(network).run("""
MATCH (A)-[]->(B)
RETURN A.username, B.username
"""))

# Mutate the graph using the underlying library:
network.add_node("C", username="@khoale88")
network.add_edge("A", "C")

# Rerun the query, no rematerialization required:
print(GrandCypher(network).run("""
MATCH (A)-[]->(B)
RETURN A.username, B.username
"""))

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

No branches or pull requests

3 participants