Neo4j GraphQL Server
  • Introduction
  • Neo4j GraphQL Server
  • Neo4j GraphQL Binding
    • neo4jGraphQLBinding
    • neo4jIDL
    • neo4jAssertConstraints
    • buildNeo4jTypeDefs
    • buildNeo4jResolvers
  • GRANDstack Starter
  • GraphQL Community Graph
Powered by GitBook
On this page
  • Strategy
  • API Reference
  • Example
  1. Neo4j GraphQL Binding

neo4jGraphQLBinding

Creates a GraphQL Binding for a Neo4j instance that uses the Neo4j-GraphQL extension.

PreviousNeo4j GraphQL BindingNextneo4jIDL

Last updated 6 years ago

Strategy

The current strategy is to create a schema using from with your typeDefs and a custom . The binding is then created over this schema.

When you send a GraphQL request to a resolver that delegates to the binding, the link receives the operation, processes it to support various features, and finally uses the Neo4j Bolt to send the operation to your Neo4j instance as a Cypher query that calls a custom procedure provided by the Neo4j-GraphQL extension. Queries use the read-only procedure and mutations use the read/write .

API Reference

  • typeDefs (required): Your GraphQL type definitions in .

  • driver(required): Your Neo4j driver instance (More info ).

  • log (default: false): Logs results from query or mutation operations.

  • indexConfig

    • use (default: 'cuid') Configures what method to use when generating id field values.

Example

import { neo4jGraphQLBinding } from 'neo4j-graphql-binding';

const binding = neo4jGraphQLBinding({
  typeDefs: typeDefs,
  driver: driver,
  log: true
});

const context = {
  neo4j: binding
  ...
};
makeRemoteExecutableSchema
graphql-tools
Apollo Link
driver
graphql.query
graphql.execute
SDL format
here