Say I have the following graph:

```
(:A) -> (:B {hasAttr: 'yes'}) -> (:C) -> (:B {hasAttr: 'yes'})

```

I want to find out the path between node type A and node type B. But I only need the path that contains one node type B. So the query return should be

```
(:A) -> (:B {hasAttr: 'yes'})

```

What is the right query?