Neo4j-GraphQL is an integration that translates GraphQL to Cypher and allows for inclusion of Cypher in GraphQL through the use of
@cypher GraphQL schema directives. There are two versions of the integration available depending on the architecture of your application.
The primary goal of the Neo4j-GraphQL integrations are to make it easy to build powerful GraphQL APIs that leverage the Neo4j graph database.
- Improve developer productivity for building GraphQL APIs
- "Auto-generate" resolvers by translating GraphQL to Cypher
- Exposing Cypher through GraphQL to enhance the functionality of GraphQL
It works by inspecting the
resolveInfo object passed to each GraphQL resolver to translate GraphQL to Cypher and handle the database call through an
The Neo4j-GraphQL plugin is a database plugin for Neo4j. It extends Neo4j by serving a GraphQL endpoint directly from Neo4j.
Using the Neo4j-GraphQL plugin makes sense if you don't have other data sources for your GraphQL API, if you don't need to implement custom resolvers (beyond the custom logic of a
@cypher schema directive), and if your clients querying the database directly is acceptable for your architecture.
- Five Common GraphQL problems and how Neo4j-GraphQL aims to solve them. [Blog post].
- Neo4j-GraphQL Developer page.
- Query Graphs with GraphQL Youtube video (Neo4j online meetup recording)