CYPHER_GET_CHECKPOINT_TREE = '\nMATCH (
t:Thread {thread_id: $thread_id, checkpoint_ns: $checkpoint_ns})\n -[:HAS_CHECKPOINT]->(c:Checkpoint)\nOPTIONAL MATCH (c)-[:PREVIOUS]->(parent:Checkpoint)\nOPTIONAL MATCH (c)-[:ON_BRANCH]->(b:Branch
)\nRETURN c.checkpoint_id as checkpoint_id,\n parent.checkpoint_id as parent_id,\n b.branch_id as branch_id,\n b.name as branch_name\nORDER BY c.checkpoint_id\n'