g3-toolkit API Reference
    Preparing search index...

    Interface GraphAdapter

    Interface that all data source adapters implement.

    interface GraphAdapter {
        expandNeighborhood(
            nodeId: string,
            depth: number,
            edgeTypes?: string[],
        ): Promise<UGM>;
        getNodeProperties(nodeId: string): Promise<PropertyMap>;
        getSchema(): Promise<SchemaModel>;
        id: string;
        name: string;
        query(q: string): Promise<UGM>;
    }

    Implemented by

    Index

    Properties

    id: string

    Short identifier (e.g., "sparql", "cypher", "holonic").

    name: string

    Human-readable name (e.g., "SPARQL Endpoint").

    Methods

    • Expand the neighborhood of a node at the given depth. Returns a UGM containing the discovered subgraph.

      Parameters

      • nodeId: string
      • depth: number
      • OptionaledgeTypes: string[]

        Optional filter to specific edge types.

      Returns Promise<UGM>

    • Execute a query and return results as a new UGM. The query language depends on the adapter (SPARQL, Cypher, etc.).

      Parameters

      • q: string

      Returns Promise<UGM>