# @mathix420/graphql-ogm

> GraphQL powered OGM for Neo4j and Javascript applications

Latest version **2.5.10** (published 2022-07-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @mathix420/graphql-ogm
pnpm add @mathix420/graphql-ogm
yarn add @mathix420/graphql-ogm
bun add @mathix420/graphql-ogm
```

## 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 | 2.5.10 |
| Published | 2022-07-16 |
| First published | 2021-07-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 70.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Neo4j Inc. |
| Maintainers | mathix420 |
| Keywords | neo4j, graphql, ogm |

## Links

- npm: https://www.npmjs.com/package/@mathix420/graphql-ogm
- Homepage: https://github.com/neo4j/graphql/tree/master/packages/ogm
- Issues: https://github.com/neo4j/graphql/issues
- npm.io page: https://npm.io/package/@mathix420/graphql-ogm

## Dependencies (8)

- [prettier](https://npm.io/package/prettier.md) 2.3.2
- [camelcase](https://npm.io/package/camelcase.md) ^6.2.0
- [pluralize](https://npm.io/package/pluralize.md) ^8.0.0
- [@mathix420/graphql](https://npm.io/package/@mathix420/graphql.md) ^2.5.10
- [@graphql-tools/merge](https://npm.io/package/@graphql-tools/merge.md) 6.2.14
- [@graphql-codegen/core](https://npm.io/package/@graphql-codegen/core.md) 2.0.0
- [@graphql-codegen/typescript](https://npm.io/package/@graphql-codegen/typescript.md) 2.0.0
- [@graphql-codegen/plugin-helpers](https://npm.io/package/@graphql-codegen/plugin-helpers.md) 2.0.0

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.5.10 (latest) — 2022-07-16
- 2.5.9 — 2022-03-23
- 2.0.6 — 2021-08-19
- 2.0.5 — 2021-08-19
- 2.0.4 — 2021-08-19
- 2.0.3 — 2021-07-29
- 2.0.2 — 2021-07-25
- 2.0.1 — 2021-07-24
- 2.0.0-alpha.5 — 2021-07-17
- 2.0.0-alpha.4 — 2021-07-17
- 2.0.0-alpha.3 — 2021-07-17
- 1.0.5 — 2021-07-04
- 1.0.4 — 2021-07-04

## README

# @mathix420/graphql-ogm

<p align="center">
  <a href="https://badge.fury.io/js/%40neo4j%2Fgraphql-ogm">
    <img alt="npm package" src="https://badge.fury.io/js/%40neo4j%2Fgraphql-ogm.svg">
  </a>
  <a href="https://discord.gg/neo4j">
    <img alt="Discord" src="https://img.shields.io/discord/787399249741479977?logo=discord&logoColor=white">
  </a>
  <a href="https://community.neo4j.com/c/drivers-stacks/graphql/33">
    <img alt="Discourse users" src="https://img.shields.io/discourse/users?logo=discourse&server=https%3A%2F%2Fcommunity.neo4j.com">
  </a>
</p>

GraphQL powered OGM for Neo4j and Javascript applications.

1. [Documentation](https://neo4j.com/docs/graphql-manual/current/ogm/)

## 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;

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

### Quick Start

```js
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](https://github.com/neo4j/graphql/blob/master/packages/ogm/LICENSE.txt)

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