npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

samyama-sdk

v1.11.0

Published

TypeScript SDK for the Samyama Graph Database

Readme

samyama-sdk — TypeScript SDK for the Samyama Graph Database

A typed HTTP client for Samyama, a property-graph database with a Cypher query engine.

This package is remote only: it talks to a running Samyama server over HTTP. There is no embedded mode in TypeScript — for in-process use, see the Python or Rust SDK.

The npm package samyama-sdk and the Rust crate samyama-sdk share a name. They are separate artifacts from the same repository.

Install

npm install samyama-sdk

ESM only. Needs Node 18+ (it uses the global fetch, AbortSignal.timeout and AbortSignal.any).

Connect

import { SamyamaClient } from "samyama-sdk";

const client = new SamyamaClient({
  url: "http://localhost:8080",  // default
  timeoutMs: 30000,              // whole-request deadline, default 30000
  maxRetries: 2,                 // retries on timeout/connection failure
  retryBaseDelayMs: 100,         // doubled each attempt
});

Or the factory, when the URL is all you need:

const client = SamyamaClient.connectHttp("http://localhost:8080");
// or, with connection settings:
const quick = SamyamaClient.connectHttp("http://localhost:8080", { timeoutMs: 5000 });

First query

import { SamyamaClient } from "samyama-sdk";

const client = SamyamaClient.connectHttp("http://localhost:8080");

await client.query('CREATE (:Person {name: "Alice"})-[:KNOWS]->(:Person {name: "Bob"})');

const result = await client.queryReadonly(
  "MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN a.name, b.name",
);

console.log(result.columns); // ["a.name", "b.name"]
for (const row of result.records) {
  console.log(row); // ["Alice", "Bob"]
}

query is read-write, queryReadonly is read-only. Both take an optional second argument graph, which defaults to "default".

A QueryResult is { nodes, edges, columns, records }.

Other methods

| Method | Returns | |---|---| | explain(cypher, graph?) | the plan, as text rows in records | | profile(cypher, graph?) | the executed plan with timings | | status() | ServerStatus | | healthy() | boolean | | ping() | string | | schema() | GraphSchema — node types, edge types, indexes, constraints | | sample(options?) | a sample subgraph | | listGraphs() | string[] | | deleteGraph(graph?) | void | | importCsv(...) / importJson(...) | import results |

HttpTransport is exported too, for callers that want the raw request layer with their own AbortSignal.

Build from source

npm install && npm run build && npm test

More

Apache-2.0.