( graph: Graph<GraphSchema>, queryString: string, debug: boolean = false, )
| 22 | } |
| 23 | |
| 24 | function executeQuery( |
| 25 | graph: Graph<GraphSchema>, |
| 26 | queryString: string, |
| 27 | debug: boolean = false, |
| 28 | ): unknown[] { |
| 29 | const ast = parse(queryString) as Query; |
| 30 | const steps = astToSteps(ast); |
| 31 | if (debug) { |
| 32 | console.log(stringifySteps(steps)); |
| 33 | } |
| 34 | const traverser = createTraverser(steps); |
| 35 | return Array.from(traverser.traverse(graph, [])); |
| 36 | } |
| 37 | |
| 38 | test("New Grammar Features - Edge Properties Parsing - should parse edge pattern with single property", () => { |
| 39 | const query = "MATCH (u:User)-[:follows {weight: 10}]->(f) RETURN f"; |
no test coverage detected