@mathix420/graphql-ogm
TypeScript icon, indicating that this package has built-in type declarations

2.5.10 • Public • Published

@mathix420/graphql-ogm

npm package Discord Discourse users

GraphQL powered OGM for Neo4j and Javascript applications.

  1. Documentation

Installation

$ npm install @mathix420/graphql-ogm

graphql & neo4j-driver are peerDependency(s)

$ npm install graphql neo4j-driver

Importing

Our TypeScript source is transpiled into Common JS, this means you can use the require syntax;

const { OGM, Model } = require("@mathix420/graphql-ogm");

Quick Start

const { OGM } = require("@mathix420/graphql-ogm");
const neo4j = require("neo4j-driver");

const typeDefs = `
    type Movie {
        id: ID
        name: String
    }
`;

const driver = neo4j.driver(
    "bolt://localhost:7687",
    neo4j.auth.basic("admin", "password")
);

const ogm = new OGM({ typeDefs, driver });

const Movie = ogm.model("Movie");

const [theMatrix] = await Movie.find({ where: { name: "The Matrix" } });

Licence

Apache 2.0

Readme

Keywords

Package Sidebar

Install

npm i @mathix420/graphql-ogm

Weekly Downloads

1

Version

2.5.10

License

Apache-2.0

Unpacked Size

71.9 kB

Total Files

43

Last publish

Collaborators

  • mathix420