Skip to Content
Mesh

Neo4j

This handler allows you to use the GraphQL schema created by @neo4j/graphql.

How to use?

To get started, install the handler library:

npm i @omnigraph/neo4j

Then you can import the library in your configuration file, and define your Neo4j source;

mesh.config.ts
import { defineConfig } from '@graphql-mesh/compose-cli' import { loadNeo4JSubgraph } from '@omnigraph/neo4j' export const composeConfig = defineConfig({ subgraphs: [ { sourceHandler: loadNeo4JSubgraph('MyNeo4j', { endpoint: 'neo4j://localhost', auth: { type: 'basic', username: 'neo4j', password: 'MY_PASSWORD' } }) } ] })

Omit database introspection by passing author Neo4j GraphQL SDL (@node, @relationship, @cypher, @alias, …) as typeDefs. Prefer @node(subgraph: "MyNeo4j") (and the same on other Neo4j directives) when you compose multiple Neo4j sources; the loader stamps subgraph when it is missing. Rename transforms keep database identity via @node(labels:) / @alias(property:) (not Mesh @source / @meshSource).

Last updated on