All Projects → adam-cowley → nest-neo4j

adam-cowley / nest-neo4j

Licence: Apache-2.0 license
A NestJS module for integrating with Neo4j

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to nest-neo4j

twitch-project
A weekly stream in which I build a web application with Neo4j and Typescript
Stars: ✭ 78 (+44.44%)
Mutual labels:  neo4j, nestjs
Drivine
Best and fastest graph database client (Neo4j & AgensGraph) for Node.js & TypeScript.
Stars: ✭ 74 (+37.04%)
Mutual labels:  neo4j, nestjs
ogma
A monorepo for the ogma logger and related packages
Stars: ✭ 201 (+272.22%)
Mutual labels:  nestjs
datatheque.com
a data science blog
Stars: ✭ 12 (-77.78%)
Mutual labels:  neo4j
django-test-addons
Testing support for different database system like Mongo, Redis, Neo4j, Memcache, Django Rest Framework for django
Stars: ✭ 20 (-62.96%)
Mutual labels:  neo4j
cytoscapeneo4j
Cytoscape plugin for neo4j
Stars: ✭ 18 (-66.67%)
Mutual labels:  neo4j
pheno4j
Pheno4j: a graph based HPO to NGS database
Stars: ✭ 31 (-42.59%)
Mutual labels:  neo4j
nt-casbin
nest.js with casbin auth Nest.js RBAC ABAC 权限管理
Stars: ✭ 27 (-50%)
Mutual labels:  nestjs
spuf-314
a Web Application prototype for public transportation, serving a RESTful API to find Stations, Bus, Metro and Tramway's Lines, while also computing the best multimodal path between two stations or addresses
Stars: ✭ 22 (-59.26%)
Mutual labels:  neo4j
InteractiveGraph-neo4j
a graph server serves backend neo4j, virtosuo as an InteractiveGraph
Stars: ✭ 102 (+88.89%)
Mutual labels:  neo4j
discord-nestjs
👾 NestJS package for discord.js
Stars: ✭ 173 (+220.37%)
Mutual labels:  nestjs
neo4j-django-tutorial
Tutorial to set up a new Django project with Neo4j REST server
Stars: ✭ 73 (+35.19%)
Mutual labels:  neo4j
cookbook
VueJS + NodeJS Evergreen Cookbook
Stars: ✭ 440 (+714.81%)
Mutual labels:  nestjs
nestjs-session
Idiomatic Session Module for NestJS. Built on top of `express-session` 😎
Stars: ✭ 150 (+177.78%)
Mutual labels:  nestjs
gorm-neo4j
GORM for Neo4j
Stars: ✭ 16 (-70.37%)
Mutual labels:  neo4j
bitnami-docker-neo4j
Bitnami Docker Image for Neo4j
Stars: ✭ 25 (-53.7%)
Mutual labels:  neo4j
nestjs-starter
🚀 Nest framework starter
Stars: ✭ 30 (-44.44%)
Mutual labels:  nestjs
sdk
Home of the JupiterOne SDK
Stars: ✭ 21 (-61.11%)
Mutual labels:  neo4j
typegraphql-nestjs
TypeGraphQL integration with NestJS
Stars: ✭ 117 (+116.67%)
Mutual labels:  nestjs
TraderCore
Core module for the StockML crypto trading application.
Stars: ✭ 41 (-24.07%)
Mutual labels:  nestjs

Nest Logo

Nest Neo4j

Neo4j integration for Nest

Description

This repository provides Neo4j integration for Nest.

Installation

$ npm i --save nest-neo4j

Quick Start

Register the Neo4j Module in your application using the forRoot method, passing the neo4j connection information as an object:

import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { Neo4jModule } from 'nest-neo4j'

@Module({
  imports: [
    Neo4jModule.forRoot({
      scheme: 'neo4j',
      host: 'localhost',
      port: 7687,
      username: 'neo4j',
      password: 'neo'
    })
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

Querying Neo4j

The Neo4jService is @Injectable, so can be passed into any constructor:

import { Neo4jService } from 'nest-neo4j'

@Controller()
export class AppController {
  constructor(private readonly appService: AppService,
    private readonly neo4jService: Neo4jService
    ) {}

  @Get()
  async getHello(): Promise<any> {
    const res = await this.neo4jService.read(`MATCH (n) RETURN count(n) AS count`)

    return `There are ${res.records[0].get('count')} nodes in the database`
  }
}

Methods

getConfig(): Neo4jConfig;
getReadSession(database?: string): Session;
getWriteSession(database?: string): Session;
read(query: string, params?: object, database?: string): Result;
write(query: string, params?: object, database?: string): Result;

More Information

For more information about running Neo4j in your Node.js or TypeScript project, checkout Neo4j GraphAcademy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].