Skip to main content

agrag.graphdb.build_graph_store

build_graph_store(value:GraphStoreName | GraphStore, *, tracer:Tracer | None = None) -> GraphStore

Build a graph store from a backend name, or return one unchanged.

Parameters:

  • value (GraphStoreName | GraphStore) – "neo4j", or an already-constructed GraphStore.
  • tracer (Tracer | None) – Passed to the newly-built store. Not valid together with an already-constructed value -- that instance's tracer, if any, was already fixed at its own construction.

Returns:

Raises:

  • ValueError – tracer is given together with an already-constructed value.