Skip to main content

agrag.graphdb.serialize.relation_params

relation_params(record:RelationRecord, *, pending_job_id:UUID | None = None) -> dict[str, Any]

Build the $records entry for a relationship upsert.

The Cutover Job tag travels in its own key for the same reason as in node_params: only an edge the job creates carries it.

Parameters:

  • record (RelationRecord) – The relation record to serialize.
  • pending_job_id (UUID | None) – The in-flight job's id, or None outside a job.

Returns:

  • dict[str, Any] – A dict with id, start_id, end_id, properties
  • dict[str, Any] – (converted), and pending_job_id (the tag as a string, or None).