@valkey/graph
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@valkey/graph

Example usage:

import { createClient, Graph } from "redis";

const client = createClient();
client.on("error", (err) => console.log("Redis Client Error", err));

await client.connect();

const graph = new Graph(client, "graph");

await graph.query(
  "CREATE (:Rider { name: $riderName })-[:rides]->(:Team { name: $teamName })",
  {
    params: {
      riderName: "Buzz Aldrin",
      teamName: "Apollo",
    },
  }
);

const result = await graph.roQuery(
  "MATCH (r:Rider)-[:rides]->(t:Team { name: $name }) RETURN r.name AS name",
  {
    params: {
      name: "Apollo",
    },
  }
);

console.log(result.data); // [{ name: 'Buzz Aldrin' }]

Readme

Keywords

Package Sidebar

Install

npm i @valkey/graph

Weekly Downloads

42

Version

1.0.0

License

MIT

Unpacked Size

24.2 kB

Total Files

26

Last publish

Collaborators

  • mat-sz