UNPKG

@neo4j/graphql

Version:

A GraphQL to Cypher query execution layer for Neo4j and JavaScript GraphQL implementations

30 lines 1.63 kB
import Cypher from "@neo4j/cypher-builder"; import type { VectorField } from "../../../../schema-model/annotation/VectorAnnotation"; import type { ConcreteEntityAdapter } from "../../../../schema-model/entity/model-adapters/ConcreteEntityAdapter"; import type { RelationshipAdapter } from "../../../../schema-model/relationship/model-adapters/RelationshipAdapter"; import type { QueryASTContext } from "../QueryASTContext"; import type { QueryASTNode } from "../QueryASTNode"; import type { ScoreField } from "../fields/ScoreField"; import type { EntitySelection } from "../selection/EntitySelection"; import { ConnectionReadOperation } from "./ConnectionReadOperation"; export type VectorOptions = { index: VectorField; vector?: number[]; phrase?: string; score: Cypher.Variable; }; export declare class VectorOperation extends ConnectionReadOperation { private scoreField; constructor({ target, relationship, scoreField, selection, }: { target: ConcreteEntityAdapter; relationship?: RelationshipAdapter; scoreField: ScoreField | undefined; selection: EntitySelection; }); getChildren(): QueryASTNode[]; protected createProjectionMapForEdge(context: QueryASTContext<Cypher.Node>): Cypher.Map; protected getUnwindClause(context: QueryASTContext<Cypher.Node>, edgeVar: Cypher.Variable, edgesVar: Cypher.Variable): Cypher.With; protected getWithCollectEdgesAndTotalCount(nestedContext: QueryASTContext<Cypher.Node>, edgesVar: Cypher.Variable, totalCount: Cypher.Variable): Cypher.With; private hasScoreSort; } //# sourceMappingURL=VectorOperation.d.ts.map