()
| 21 | } |
| 22 | |
| 23 | function createTestGraph(): Graph<GraphSchema> { |
| 24 | const schema = { |
| 25 | vertices: { |
| 26 | Person: { |
| 27 | properties: { |
| 28 | name: { type: makeType<string>("") }, |
| 29 | age: { type: makeType<number>(0) }, |
| 30 | temp: { type: makeType<string | undefined>(undefined) }, |
| 31 | }, |
| 32 | }, |
| 33 | Item: { |
| 34 | properties: { |
| 35 | value: { type: makeType<number>(0) }, |
| 36 | }, |
| 37 | }, |
| 38 | }, |
| 39 | edges: { |
| 40 | KNOWS: { |
| 41 | properties: {}, |
| 42 | }, |
| 43 | }, |
| 44 | } as const satisfies GraphSchema; |
| 45 | |
| 46 | return new Graph({ schema, storage: new InMemoryGraphStorage() }); |
| 47 | } |
| 48 | |
| 49 | function executeQuery(graph: Graph<GraphSchema>, queryString: string): unknown[] { |
| 50 | const ast = parse(queryString) as Query; |
no test coverage detected