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 a
Neo4j GraphQL Database Plugin
The Neo4j GraphQL database plugin is a plugin that extends Neo4j by serving a GraphQL endpoint directly from Neo4j.
Using the Neo4j GraphQL database 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)