what's the best way to find the last leaf node? It's for a timeline like structure where a node is added at the end.
Schema looks like this: (:Node)<-[:IS_PARENT]-(:Node)<-[:IS_PARENT]-(:Node).......
So a Node will always only have one parent.
I could maybe match the number of relations and if it's only 1 then I know it is the last leaf.
Or I could save an additional property isLastLeaf = true just so I can match it. But then I have to change the property every time I add a new leaf. Or maybe get the :Node with the highest id?
What is the recommended approach?