Add path query execution builder to bgraph utils. See consideration.
Refactored edge/node/path cases into their own utility for code clarity and de-duplication.
Handle the results of a path query different from the results of an edge/node query. In a path query the bgraph query results are flattened to include the underlying path present within the Gremlin's state. In an edge/node query the underlying Gremlin's path state is ignored.
A path query clause is broken up into a pre- path clause and a -post path clause before running the path query builder function. This is because to create an n-hop path query in bgraph you need to first filter down the result space using your "from" value in the query and then later on in the query select which results to store based on your "to" value.
Considerations
Design consideration: When a user selects a path query, edge/node filters are treated as filters along each step of the path; pruning potential paths that do not satisfy the filters.
Edge/Node filters are applied to every node/edge along the path; thus it is not possible via the current interface to make queries that have at least one node/edge along the path that fits a criteria. Additionally, any filter queries that only act on certain edges/nodes along the path are not possible via the current interface.
The paths that get outputted have a maximum length of 6 hops. This value can be increased, however, it comes with a negative performance trade-off.
Testing
Ensure that you run yarn install prior to testing as the bgraph module has been updated from 0.1.0-> 0.2.0
Description
Add path queries to the bio view. See attached screenshots for examples.
Changes
Considerations
Testing
yarn install
prior to testing as the bgraph module has been updated from 0.1.0-> 0.2.0Screenshots