1
0
mirror of https://github.com/redis/node-redis.git synced 2025-07-31 05:44:24 +03:00
Files
Gady c88dea6151 Augment subpackages npm info (#2478)
* augment subpackages npm info

* some more keywords

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-04-24 12:41:44 -04:00
..
2023-01-30 14:02:15 -05:00
2022-12-26 13:35:37 -05:00
2022-01-31 12:52:19 -05:00
2022-11-01 15:54:29 -04:00
2022-01-31 12:52:19 -05:00

@redis/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' }]