hope you can help me with this, so basically I'm looking for a way to Find all paths till the first node of certain label (the query should explore all the paths from a node and stop when a node with a specific label is found).
I have two labels (A and B)
let us say we have the following connectivity
A1>B1>B2>A2>B6>A6
A1>A4>A5
A1>B3>A3>B8>A7
i want to know how can i return path starting from A1 till the first node of label A only therefore the output should be like this:
A1>B1>B2>A2
A1>A4
A1>B3>A3
screenshot of the graph is below

what im looking for as a result should be like the below

thanks in advance