def create_relationship( db: PartitionedDatabase, record_id: RecordId, body: JsonDict ) -> Tuple[JsonDict, int]: (relationship, _) = db.create_record_relationship( from_record=record_id, relationship=body["type_"], to_record=body["to"] ) return relationship.to_dict(), 201
def create_linked_property(db: PartitionedDatabase, concept_id: str, id_: RecordId, body: JsonDict): (rr, _) = db.create_record_relationship( from_record=id_, relationship=body["schema_linked_property_id"], to_record=body["to"], ) return to_linked_property(rr), 201