prorm API Reference
    Preparing search index...

    Class TigerGraphStore

    TigerGraphStore wraps TigerGraph's REST++ and GSQL-server HTTP APIs behind a typed, promise-based interface: token-based auth, installed (pre-compiled GSQL) query execution, vertex/edge upsert and retrieval, ad-hoc interpreted queries, and vertex/edge-type schema introspection.

    Index
    name: "tigergraph" = 'tigergraph'
    library: "fetch" = 'fetch'
    • Returns a small facade over the underlying HTTP transport for operations not wrapped here - there is no native driver client to expose, since this store talks to TigerGraph over plain fetch.

      Returns {
          token: string | null;
          restBaseUrl: string;
          gsqlBaseUrl: string;
          restRequest: (
              path: string,
              init?: RequestInit,
          ) => Promise<TigerGraphEnvelope<unknown>>;
          gsqlRequest: (
              path: string,
              init?: RequestInit,
          ) => Promise<TigerGraphEnvelope<unknown>>;
      }

    • Run an installed GSQL query: GET /query/{graph}/{queryName}?param=value (simple/scalar params) or POST /query/{graph}/{queryName} with a JSON body (complex params, e.g. sets/vertex lists). Confirmed endpoint shape and response envelope ({version, error, message, results}).

      Type Parameters

      • T = unknown

      Parameters

      • queryName: string
      • params: Record<string, string | number | boolean> = {}
      • options: RunQueryOptions = {}

      Returns Promise<T>

    • POST /graph/{graph} - raw upsert matching TigerGraph's documented wire format exactly (attribute values pre-wrapped as {value: x}). Prefer upsertVertex/upsertVertices/upsertEdge/upsertEdges for the common case of plain attribute values.

      Parameters

      Returns Promise<{ accepted_vertices: number; accepted_edges: number }>

    • Upsert a single vertex with plain (unwrapped) attribute values.

      Parameters

      • vertexType: string
      • id: string
      • attributes: PlainAttributes = {}
      • Optionalgraph: string

      Returns Promise<{ accepted_vertices: number; accepted_edges: number }>

    • Upsert multiple vertices of the same type in one round trip.

      Parameters

      • vertexType: string
      • vertices: Record<string, PlainAttributes>
      • Optionalgraph: string

      Returns Promise<{ accepted_vertices: number; accepted_edges: number }>

    • Upsert a single edge with plain (unwrapped) attribute values.

      Parameters

      • fromType: string
      • fromId: string
      • edgeType: string
      • toType: string
      • toId: string
      • attributes: PlainAttributes = {}
      • Optionalgraph: string

      Returns Promise<{ accepted_vertices: number; accepted_edges: number }>

    • Upsert multiple edges (possibly spanning different types/vertices) in one round trip.

      Parameters

      Returns Promise<{ accepted_vertices: number; accepted_edges: number }>

    • GET /graph/{graph}/vertices/{type}/{id} - fetch a single vertex by ID. Confirmed endpoint/response shape. Returns null if the vertex does not exist (TigerGraph reports this as error: true with a "does not exist" message rather than an empty result set).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • vertexType: string
      • id: string
      • Optionalgraph: string

      Returns Promise<TigerGraphVertex<T> | null>

    • GET /graph/{graph}/vertices/{type} - list vertices of a type (omitting the ID segment of the single-vertex endpoint above). TigerGraph's built-in-endpoints documentation confirms the single-vertex form; the list form (same resource without an ID, plus an optional limit query parameter) follows the standard REST++ collection-resource pattern but its full parameter set (filter, select, sort, etc.) was not independently re-verified while building this store - only limit is wired up here (see README).

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      Returns Promise<TigerGraphVertex<T>[]>

    • DELETE /graph/{graph}/vertices/{type}/{id} - delete a single vertex (and its incident edges). Returns the number of vertices deleted (0 or 1).

      Parameters

      • vertexType: string
      • id: string
      • Optionalgraph: string

      Returns Promise<number>

    • GET /graph/{graph}/edges/{fromType}/{fromId}/{edgeType}/{toType}/{toId}

      • fetch the edge(s) between two specific vertices. Confirmed endpoint/response shape. Returns an empty array if no such edge exists.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • fromType: string
      • fromId: string
      • edgeType: string
      • toType: string
      • toId: string
      • Optionalgraph: string

      Returns Promise<TigerGraphEdge<T>[]>

    • GET /graph/{graph}/edges/{fromType}/{fromId}[/{edgeType}] - list all edges (of the given type, if provided) originating from a vertex. Same confidence note as getEdge()'s partial-path collection form.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • fromType: string
      • fromId: string
      • OptionaledgeType: string
      • Optionalgraph: string

      Returns Promise<TigerGraphEdge<T>[]>

    • DELETE /graph/{graph}/edges/{fromType}/{fromId}/{edgeType}/{toType}/{toId} - delete a single edge. Returns the number of edges deleted.

      Parameters

      • fromType: string
      • fromId: string
      • edgeType: string
      • toType: string
      • toId: string
      • Optionalgraph: string

      Returns Promise<number>

    • POST /gsql/v1/queries/interpret - compile and run a GSQL query string on the fly, without installing it first. Confirmed endpoint, auth (HTTP Basic, not the REST++ bearer token), and request shape: the request body is the raw GSQL text (Content-Type: text/plain), and GSQL query parameters are passed as URL query-string parameters.

      The older path /gsqlserver/interpreted_query (used by some pre-4.x deployments) is documented only in community sources, not in TigerGraph's current official docs, and its exact request shape was not independently confirmed - this store intentionally does not implement that alias rather than guess at its shape. If you're on a version that needs it, issue the request yourself via getClient().restRequest()/gsqlRequest() (or plain fetch) once you've confirmed the shape against your deployment.

      Type Parameters

      • T = unknown

      Parameters

      Returns Promise<T>