diff --git a/src/utils/cypher/converter/relation.ts b/src/utils/cypher/converter/relation.ts index 0cc8da4fd5433e935d51eaeeefd27632290a2725..2912225215d7dd0204fed9a52c5a75eb171bc897 100644 --- a/src/utils/cypher/converter/relation.ts +++ b/src/utils/cypher/converter/relation.ts @@ -1,6 +1,7 @@ import type { RelationStruct } from 'ts-common'; import { getNodeCypher } from './node'; import type { QueryCacheData } from './model'; +import { log } from 'ts-common/src/logger/logger'; export const NoNodeError = new Error('relation must have a node'); diff --git a/src/utils/reactflow/query2backend.ts b/src/utils/reactflow/query2backend.ts index e0afe465d1987ff1edc6ba12f726ea166bdbc7a9..7b797d23f1591731aebd5b0b89dbf0f3d5a86478 100644 --- a/src/utils/reactflow/query2backend.ts +++ b/src/utils/reactflow/query2backend.ts @@ -14,7 +14,7 @@ import type { } from 'ts-common/src/model/graphology'; import type { AllLogicStatement } from 'ts-common/src/model/query/logic/general'; import { QueryElementTypes } from 'ts-common/src/model/reactflow'; -import { type QueryBuilderSettings, QueryUnionType } from 'ts-common/src/model/query/queryBuilderModel'; +import { type QueryBuilderSettings, QueryRelationDirection, QueryUnionType } from 'ts-common/src/model/query/queryBuilderModel'; import { log } from '../../logger'; // Chunk extraction: traverse graph to find all paths of logic between relations and entities @@ -269,9 +269,9 @@ export function Query2BackendQuery( depth: _currNode.depth, direction: !_currNode.direction ? 'BOTH' - : _currNode.direction === 'right' + : _currNode.direction === QueryRelationDirection.RIGHT ? 'TO' - : _currNode.direction === 'left' + : _currNode.direction === QueryRelationDirection.LEFT ? 'FROM' : 'BOTH', node: chunk.length === position + 1 ? undefined : (processConnection(chunk, position + 1) as NodeStruct),