Adding Fact Triples
A “fact triple” consists of two nodes and an edge between them, where the edge typically contains some fact. You can manually add a fact triple of your choosing to the graph like this:
Use an application-authorized group_id for all three objects. Derive the
namespace from authenticated application state. Do not accept a group_id
from an untrusted request. For more information, read
Graph namespacing.
When you add a fact triple, Graphiti will attempt to deduplicate your passed in nodes and edge with the already existing nodes and edges in the graph. If there are no duplicates, it will add them as new nodes and edges.
You can also avoid constructing EntityEdge or EntityNode objects manually
by using Graphiti search results. See
Searching the Graph.