{"id":15020876,"url":"https://github.com/dilane3/neo4j-module","last_synced_at":"2026-02-08T14:32:56.732Z","repository":{"id":61678830,"uuid":"553311164","full_name":"dilane3/neo4j-module","owner":"dilane3","description":"This module provides Neo4j integration for Nestjs.","archived":false,"fork":false,"pushed_at":"2022-10-20T15:56:06.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T13:11:29.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dilane3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-18T02:58:37.000Z","updated_at":"2022-10-20T16:12:39.000Z","dependencies_parsed_at":"2023-01-20T06:45:52.767Z","dependency_job_id":null,"html_url":"https://github.com/dilane3/neo4j-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dilane3/neo4j-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilane3%2Fneo4j-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilane3%2Fneo4j-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilane3%2Fneo4j-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilane3%2Fneo4j-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dilane3","download_url":"https://codeload.github.com/dilane3/neo4j-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilane3%2Fneo4j-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29233208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:55:47.689Z","updated_at":"2026-02-08T14:32:56.713Z","avatar_url":"https://github.com/dilane3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://kamilmysliwiec.com/public/nest-logo.png#1\" alt=\"Nest Logo\" /\u003e   \u003c/a\u003e\n  \u003ca href=\"https://neo4j.com\" target=\"_blank\"\u003e\u003cimg src=\"https://dist.neo4j.com/wp-content/uploads/20140926224303/neo4j_logo-facebook.png\" width=\"300\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Neo4j Module\n\n\u003e Neo4j integration for Nest Application\n\n## Description\n\nThis module provides [Neo4j](https://www.neo4j.com) integration for [Nest](http://nestjs.com/).\n\n## Installation\n\n```bash\n$ npm install --save neo4j-module\n```\n\nor\n\n```bash\n$ yarn add neo4j-module\n```\n\n## Quick Start\n\nWe need to register our neo4j module in our root module which is AppModule in our case and call the forRootAsync method with the configuration object.\n\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\nimport { Neo4jModule } from 'neo4j-module';\nimport { Todo } from './entity/todo.entity';\n\n@Module({\n  imports: [\n    Neo4jModule.forRootAsync({\n      scheme: 'bolt',\n      host: 'localhost',\n      port: '7687',\n      username: 'neo4j',\n      password: 'ne04j',\n    }),\n  ],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}\n```\n\n## Querying Neo4j\n\nThe `Neo4jService` is `@Injectable`, so it can be passed into any constructor. And for querying\nyou have to be familiar with the [cyper-query-builder](https://jamesfer.me/cypher-query-builder/index.html) module.\n\nNote that you have to inject the **Neo4jService** using the **@Inject()** decorator\n\n```typescript\nimport { HttpException, \nInject } from '@nestjs/common';\nimport { Neo4jService } from 'neo4j-module';\n\n@Controller('todos')\nexport class AppController {\n  constructor(\n    @Inject(Neo4jService) private readonly neo4jService: Neo4jService,\n  ) {}\n\n  @Get('')\n  async getTodos() {\n    const query = this.neo4jService.initQuery();\n\n    try {\n      const result = await query.matchNode('todo', 'Todo').return('todo').run();\n\n      if (result \u0026\u0026 result.length \u003e 0) {\n        const todos = result.map((todo) =\u003e {\n          const todoData = todo['todo'].properties;\n\n          return new Todo(todoData);\n        });\n\n        return todos;\n      }\n    } catch (err) {\n      throw new HttpException(\"Can't get Todos\", 500);\n    }\n  }\n}\n```\n\n## Keywords\n\n- nestjs\n- neo4j\n- cypher\n- query-builder\n- connection\n- nosql database\n\n## License\n\n  Nest is [MIT licensed](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilane3%2Fneo4j-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdilane3%2Fneo4j-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilane3%2Fneo4j-module/lists"}