CRUD Operations
How to access and modify Nodes and Edges
Graphiti defines two abstract base classes and nine concrete graph classes.
The Graphiti instance provides CRUD namespaces for these classes:
graphiti.nodes.entitygraphiti.nodes.episodegraphiti.nodes.communitygraphiti.nodes.sagagraphiti.edges.entitygraphiti.edges.episodicgraphiti.edges.communitygraphiti.edges.has_episodegraphiti.edges.next_episode
Each namespace uses the configured GraphDriver.
Save an entity node
The entity namespace generates the name embedding before it saves the node.
Get an entity node
You can also get multiple nodes by UUID or group:
Delete an entity node
The node namespaces also provide delete_by_uuids and
delete_by_group_id methods.
Save and get an entity edge
The entity edge namespace generates the fact embedding before it saves the edge.
Delete the edge through the same namespace:
The entity edge namespace also provides methods to get edges between two nodes, get edges for one node, and operate on lists of UUIDs.