Graphora API
    Preparing search index...

    Interface GraphNodeCollection<NodeData, EdgeData>

    Store-backed node membership with one-hop traversal and atomic batch helpers.

    interface GraphNodeCollection<NodeData = unknown, EdgeData = unknown> {
        size: number;
        filter(
            predicate: (node: GraphNode<NodeData>, index: number) => boolean,
        ): GraphNodeCollection<NodeData, EdgeData>;
        forEach(visitor: (item: GraphNode, index: number) => void): void;
        has(id: GraphId): boolean;
        ids(): readonly GraphId[];
        incidentEdges(): GraphEdgeCollection<NodeData, EdgeData>;
        incomingEdges(): GraphEdgeCollection<NodeData, EdgeData>;
        keys(): readonly string[];
        map<T>(mapper: (item: GraphNode, index: number) => T): readonly T[];
        neighbors(
            direction?: NeighborDirection,
        ): GraphNodeCollection<NodeData, EdgeData>;
        outgoingEdges(): GraphEdgeCollection<NodeData, EdgeData>;
        toArray(): readonly GraphNode<NodeData>[];
        updateAttributes(
            attributes: GraphAttributes,
            mode?: AttributeUpdateMode,
        ): GraphBatchMutationResult;
        updateData(
            updater: (node: GraphNode<NodeData>, index: number) => NodeData,
        ): GraphBatchMutationResult;
    }

    Type Parameters

    • NodeData = unknown
    • EdgeData = unknown

    Hierarchy

    Index
    size: number

    Number of members that currently exist in the source store.

    • Parameters

      • visitor: (item: GraphNode, index: number) => void

      Returns void

    • Parameters

      Returns boolean

    • Current stored ID representations, in current store order.

      Returns readonly GraphId[]

    • Returns readonly string[]

    • Type Parameters

      • T

      Parameters

      Returns readonly T[]

    • Frozen record array; application data retains its original reference semantics.

      Returns readonly GraphNode<NodeData>[]