Skip to content

GraphsClientSync

relationalai.services.graphs.client_sync
GraphsClientSync(gateway: GraphsGatewaySync, *, config: "Config | None" = None)

Synchronous graphs client (public API for connect_sync()).

See GraphsClient for full semantics; methods here mirror that API but return synchronously.

GraphsClientSync.close() -> None

Close the client (no-op).

Gateways do not own shared transports; the root platform client is responsible for closing transports/sessions.

Returns:

  • None - Always returns None.
GraphsClientSync.list() -> list[Graph]

List all graphs visible to the caller.

Returns:

  • list[Graph] - The graphs the server returns, sorted by name.
GraphsClientSync.get(name: str) -> Graph | None

Get a graph by name, returning None if it does not exist.

Returns:

  • Graph | None - The graph, or None if not found.
GraphsClientSync.create(name: str) -> None

Create a new (empty) graph.

Args: name: The graph name to create.

Returns:

  • None - Always returns None.
GraphsClientSync.clone(source: str, target: str, *, force: bool = False) -> None

Clone source to a new graph target.

Args: source: Existing graph to clone from. target: New graph to create. force: When True, delete an existing target before cloning.

Returns:

  • None - Always returns None.
GraphsClientSync.delete(name: str, *, force: bool = False, language: str = "rel") -> None

Delete (or release the index for) a graph.

Args: name: The graph to delete. force: Bypass model.reuse_model and force a full delete. language: Language hint forwarded only on index-release deletes ("rel" or "lqp"). Ignored when use_graph_index is disabled — the plain database-delete endpoint does not accept a language hint. Matches v0 delete_graph(..., language=...) behavior.

Returns:

  • None - Always returns None. Missing graphs are treated as a no-op.