()
| 57 | } as const satisfies GraphSchema; |
| 58 | |
| 59 | function createTestGraph() { |
| 60 | const graph = new Graph({ schema, storage: new InMemoryGraphStorage() }); |
| 61 | graph.addVertex("Person", { name: "Alice", age: 30 }); |
| 62 | graph.addVertex("Person", { name: "Bob", age: 25 }); |
| 63 | graph.addVertex("Person", { name: "Charlie", age: 35 }); |
| 64 | graph.addVertex("Animal", { name: "Rex", species: "dog" }); |
| 65 | graph.addVertex("Animal", { name: "Fluffy", species: "cat" }); |
| 66 | graph.addVertex("Repository", { repositoryName: "my-repo" }); |
| 67 | graph.addVertex("Repository", { repositoryName: "another-repo" }); |
| 68 | graph.addVertex("Directory", { dirname: "/src" }); |
| 69 | graph.addVertex("Directory", { dirname: "/test" }); |
| 70 | return graph; |
| 71 | } |
| 72 | |
| 73 | function executeQuery(graph: Graph<GraphSchema>, queryString: string): unknown[] { |
| 74 | const ast = parse(queryString) as Query | UnionQuery | MultiStatement; |
no test coverage detected