Introduction

The Neo4j GraphQL Library is a highly flexible, low-code, open source JavaScript library that enables rapid API development for cross-platform and mobile applications by tapping into the power of connected data.

With Neo4j as the graph database, the GraphQL Library makes it simple for applications to have application data treated as a graph natively from the front-end all the way to storage, avoiding duplicate schema work and ensuring flawless integration between front-end and backend developers.

Written in TypeScript, the library’s schema-first paradigm lets developers focus on the application data they need, while taking care of the heavy lifting involved in building the API.

Just want to get moving with the Neo4j GraphQL Library? Check out the Getting Started guide!

How does it work?

By supplying the Neo4j GraphQL Library with a set of type definitions describing the shape of your graph data, it can generate an entire executable schema with all of the additional types needed to execute queries and mutations to interact with your Neo4j database.

For every query and mutation that is executed against this generated schema, the Neo4j GraphQL Library generates a single Cypher query which is executed against the database. This eliminates the infamous N+1 Problem which can make GraphQL implementations slow and inefficient.

Features

The Neo4j GraphQL Library presents a large feature set for interacting with a Neo4j database using GraphQL:

Interaction

In the Getting Started guide, Apollo Server is used to host the GraphQL schema. This bundles Apollo Sandbox which can be used to interact directly with your GraphQL API with no front-end.

There are a variety of front-end frameworks with clients for interacting with GraphQL APIs:

Deployment

There are a variety of methods for deploying GraphQL APIs, the details of which will not be in this documentation.

However, Apollo has documented a subset in their Deployment documentation, which will be a good starting point.

Versioning

The Neo4j GraphQL Library uses Semantic Versioning. Given a version number MAJOR.MINOR.PATCH, the increment is based on:

  • MAJOR - incompatible API changes compared to the previous MAJOR version, for which you will likely have to migrate.

  • MINOR - new features have been added in a backwards compatible manner.

  • PATCH - bug fixes have been added in a backwards compatible manner.

Additionally, prerelease version numbers may have additional suffixes, for example MAJOR.MINOR.PATCH-PRERELEASE.NUMBER, where PRERELEASE is one of the following:

  • alpha - unstable prerelease artifacts, and the API may change between releases during this phase.

  • beta - feature complete prerelease artifacts, which will be more stable than alpha releases but will likely still contain bugs.

  • rc - release candidate release artifacts where each could be promoted to a stable release, in a last effort to find trailing bugs.

NUMBER in the suffix is simply an incrementing release number in each phase.

Requirements

  1. Neo4j Database 4.1.5+

  2. APOC 4.1.0+

  3. Node.js 12+

Licence

  1. Documentation: Creative Commons 4.0

  2. Source: Apache 2.0