{"_id":"@efebia/neo4j-graphql-ogm","name":"@efebia/neo4j-graphql-ogm","dist-tags":{"latest":"5.3.4-1.0.1"},"versions":{"5.3.4-1.0.1":{"name":"@efebia/neo4j-graphql-ogm","version":"5.3.4-1.0.1","description":"GraphQL powered OGM for Neo4j and Javascript applications","keywords":["neo4j","graphql","ogm"],"license":"Apache-2.0","bugs":{"url":"https://github.com/efebia-com/neo4j-graphql/issues"},"homepage":"https://github.com/efebia-com/neo4j-graphql/tree/develop/packages/ogm","exports":"./dist/index.js","main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"build":"tsc --build tsconfig.production.json","test":"jest","test:unit":"jest src/**/*.test.ts","test:unit:watch":"jest src --watch","test:int":"jest tests/integration","test:int:watch":"test:int -- --watch"},"author":{"name":"Neo4j Inc."},"dependencies":{"@graphql-codegen/core":"^4.0.0","@graphql-codegen/plugin-helpers":"^5.0.0","@graphql-codegen/typescript":"^4.0.0","@graphql-codegen/typescript-resolvers":"^4.0.0","@graphql-tools/merge":"^9.0.0","@neo4j/graphql":"^5.3.4","prettier":"^2.7.1"},"peerDependencies":{"graphql":"^16.0.0","neo4j-driver":"^5.8.0"},"devDependencies":{"@types/jest":"29.5.12","@types/node":"20.12.8","camelcase":"6.3.0","jest":"29.7.0","jsonwebtoken":"9.0.2","pluralize":"8.0.0","randomstring":"1.3.0","semver":"7.6.0","ts-jest":"29.1.2","typescript":"5.1.6"},"_id":"@efebia/neo4j-graphql-ogm@5.3.4-1.0.1","gitHead":"e79ef0d9ee5cb2a5e4efd48218f13fa606fd9cf2","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-gC0Hwv1RaZKX9vojf9FU/Cme8peq0JOs67DZ7qw5tqFTlbCNgJhHF/mRnQXOc7+HkceWa29ShD7P7x8dIx9mvQ==","shasum":"fa788fef29d984c7ea1de184c1e55d2a34b8383a","tarball":"https://registry.npmjs.org/@efebia/neo4j-graphql-ogm/-/neo4j-graphql-ogm-5.3.4-1.0.1.tgz","fileCount":55,"unpackedSize":126623,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArRPINRR1tHkCmy4bGdKHfZLrLa+U7JtZj00oCaD+LuAiAuJXJ1nBq5jGHEFNI+R4CLiyXhHpKnq7bjsZyDnr5Q1Q=="}]},"_npmUser":{"name":"efebia-owner","email":"info@efebia.com"},"directories":{},"maintainers":[{"name":"calogero","email":"kalos9214@gmail.com"},{"name":"efebia-owner","email":"info@efebia.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/neo4j-graphql-ogm_5.3.4-1.0.1_1715078788514_0.20964382670952753"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-07T10:46:28.394Z","5.3.4-1.0.1":"2024-05-07T10:46:28.649Z","modified":"2024-05-07T10:46:29.004Z"},"maintainers":[{"name":"calogero","email":"kalos9214@gmail.com"},{"name":"efebia-owner","email":"info@efebia.com"}],"description":"GraphQL powered OGM for Neo4j and Javascript applications","homepage":"https://github.com/efebia-com/neo4j-graphql/tree/develop/packages/ogm","keywords":["neo4j","graphql","ogm"],"author":{"name":"Neo4j Inc."},"bugs":{"url":"https://github.com/efebia-com/neo4j-graphql/issues"},"license":"Apache-2.0","readme":"# @neo4j/graphql-ogm\n\n<p align=\"center\">\n  <a href=\"https://badge.fury.io/js/%40neo4j%2Fgraphql-ogm\">\n    <img alt=\"npm package\" src=\"https://badge.fury.io/js/%40neo4j%2Fgraphql-ogm.svg\">\n  </a>\n  <a href=\"https://discord.gg/neo4j\">\n    <img alt=\"Discord\" src=\"https://img.shields.io/discord/787399249741479977?logo=discord&logoColor=white\">\n  </a>\n  <a href=\"https://community.neo4j.com/c/drivers-stacks/graphql/33\">\n    <img alt=\"Discourse users\" src=\"https://img.shields.io/discourse/users?logo=discourse&server=https%3A%2F%2Fcommunity.neo4j.com\">\n  </a>\n</p>\n\nGraphQL powered OGM for Neo4j and Javascript applications.\n\n1. [Documentation](https://neo4j.com/docs/graphql-manual/current/ogm/)\n\n## Installation\n\n```\nnpm install @neo4j/graphql-ogm\n```\n\n⚠ `graphql` & `neo4j-driver` are **peerDependency**(s)\n\n```\nnpm install graphql neo4j-driver\n```\n\n## Importing\n\nOur TypeScript source is transpiled into Common JS, this means you can use the `require` syntax;\n\n```js\nconst { OGM, Model } = require(\"@neo4j/graphql-ogm\");\n```\n\n### Quick Start\n\n```js\nconst { OGM } = require(\"@neo4j/graphql-ogm\");\nconst neo4j = require(\"neo4j-driver\");\n\nconst typeDefs = `\n    type Movie {\n        id: ID\n        name: String\n    }\n`;\n\nconst driver = neo4j.driver(\"bolt://localhost:7687\", neo4j.auth.basic(\"admin\", \"password\"));\n\nconst ogm = new OGM({ typeDefs, driver });\n\nasync function main() {\n    await ogm.init();\n\n    const Movie = ogm.model(\"Movie\");\n\n    const [theMatrix] = await Movie.find({ where: { name: \"The Matrix\" } });\n}\n```\n\n### Find Safe\nAdds type safety to the `find` functionality, with an additional method `findSafe`.\nThe only difference is that it takes an object with boolean values instead of a plain GraphQL string/DocumentNode.\n\n```js\nconst { OGM } = require(\"@neo4j/graphql-ogm\");\nconst neo4j = require(\"neo4j-driver\");\n\nconst typeDefs = `\n    type Movie {\n        id: ID\n        name: String\n    }\n`;\n\nconst driver = neo4j.driver(\"bolt://localhost:7687\", neo4j.auth.basic(\"admin\", \"password\"));\n\nconst ogm = new OGM({ typeDefs, driver });\n\nasync function main() {\n    await ogm.init();\n\n    const Movie = ogm.model(\"Movie\");\n\n    const [theMatrix] = await Movie.findSafe({ where: { name: \"The Matrix\" }, selectionSet: { name: true } });\n    //`theMatrix` will have the shape `{ name: Maybe<String> | undefined }`\n}\n```\n\n## Licence\n\n[Apache 2.0](https://github.com/neo4j/graphql/blob/dev/packages/ogm/LICENSE.txt)\n","readmeFilename":"README.md"}