# redisgraph.ts

> Connect to RedisGraph 1.0.0 and up from TypeScript

Latest version **1.2.1** (published 2019-03-01) · BSD 3 license · 0 weekly downloads

## Install

```sh
npm install redisgraph.ts
pnpm add redisgraph.ts
yarn add redisgraph.ts
bun add redisgraph.ts
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2019-03-01 |
| First published | 2019-02-24 |
| Weekly downloads | 0 |
| License | BSD 3 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 28.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | RedisLabs |
| Maintainers | deniscarriere |

## Links

- npm: https://www.npmjs.com/package/redisgraph.ts
- Repository: https://github.com/eosnationftw/redisgraph.ts
- Homepage: https://github.com/eosnationftw/redisgraph.ts#readme
- Issues: https://github.com/eosnationftw/redisgraph.ts/issues
- npm.io page: https://npm.io/package/redisgraph.ts

## Dependencies (1)

- [redis](https://npm.io/package/redis.md) *

## Recent versions

- 1.2.1 (latest) — 2019-03-01
- 1.2.0 — 2019-02-27
- 1.1.5 — 2019-02-25
- 1.1.4 — 2019-02-24

## README

# redisgraph.ts

> TypeScript implementation of [redisgraph.js](https://github.com/RedisGraph/redisgraph.js).

[RedisGraph](https://github.com/RedisLabsModules/redis-graph/) TypeScript Client

# Installation

Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):

```bash
$ npm install --save redisgraph.ts
```

## Overview

### Official Releases

# Example: Using the Typescript Client

```typescript
import { RedisGraph } from "redisgraph.ts";

(async () => {
	const graph = new RedisGraph("social");
	await graph.query("CREATE (:person{name:'roi',age:32})");
	await graph.query("CREATE (:person{name:'amit',age:30})");
	await graph.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(a)");
	const res = await graph.query("MATCH (a:person)-[:knows]->(:person) RETURN a");

	while (res.hasNext()) {
		const record = res.next();
		console.log(record.get("a.name"));
	}
	console.log(res.getStatistics().queryExecutionTime());

})().catch(err => console.log(err))
```

## Running tests

A simple test suite is provided, and can be run with:

```sh
$ npm test
```

The tests expect a Redis server with the RedisGraph module loaded to be available at localhost:6379

## License

redisgraph.js is distributed under the BSD3 license - see [LICENSE](LICENSE)

[npm-image]: https://img.shields.io/npm/v/express.svg
[npm-url]: https://npmjs.org/package/redisgraph.js

---
_Source: https://npm.io/package/redisgraph.ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
