It seems that GraphQL users could benefit from using __graph databases and graph database users could benefit from using GraphQL. Thankfully, much has already been done to support this direction.
As part of the GRANDstack project, Neo4j has built a GraphQL-Endpoint extension named Neo4j-GraphQL, which provides an auto-generated API and custom database procedures for updating the schema and running operations. They have also developed the neo4j-graphql-js package, which converts GraphQL requests directly to Cypher requests and is especially useful in situations where the Neo4j-GraphQL extension is not available.
The Apollo Platform provides a variety of technologies that support working with GraphQL, including Apollo Server 2.0 and Apollo Link for composable networking.
Prisma has developed a collection of GraphQL resources. Their graphql-binding package makes it easier to use schema delegation. They have also built the Prisma API, which supports nested mutations.
The goal of this project is to use Neo4j graph databases and Apollo server and networking resources to support progressively enhancing a GraphQL API that draws from current developments within the GraphQL community and further explores using GraphQL with graph databases. Given that Neo4j uses a property graph model, it should be interesting to develop features that take advantage of relationship properties.
- Augments your schema without needing to introspect your
Neo4j-GraphQL
HTTP endpoint and uses the โก Bolt driver for all operations. - Allows using the @cypher directive from
Neo4j-GraphQL
for computed fields, query types and mutations. - Supports the same query types generated by
Neo4j-GraphQL
, as well as the query argumentsfirst
,offset
,orderBy,
andfilter
, similar to those found in the Prisma Query API. - Supports nested create and connect mutations like those in the Prisma Mutation API (update, delete, etc. in development).
- Generates resolvers for query and mutation types with a
@cypher
directive, as well as all auto-generated types. - Supports a @unique field directive for node property constraints in Neo4j in order to make node selection more robust.
- Adds a id: ID! @unique field (if not provided) to any type with a
@model
directive and uses the cuid package to generate id field values for all auto-generated creation mutations.
- Using The Neo4j-GraphQL Plugin In Neo4j Desktop https://blog.grandstack.io/using-the-neo4j-graphql-plugin-in-neo4j-desktop-c8a60aa014d9
- GRANDstack -- Build full stack graph applications with ease https://grandstack.io/
- Neo4j-GraphQL Extension -- A GraphQL-Endpoint extension for Neo4j https://github.com/neo4j-graphql/neo4j-graphql
- Using neo4j-graphql-js https://grandstack.io/docs/neo4j-graphql-js.html
- What are GraphQL Bindings? https://www.prisma.io/blog/graphql-binding-2-0-improved-api-schema-transforms-automatic-codegen-5934cd039db1/
- Open Source Prisma Resources https://oss.prisma.io/
- Apollo Server 2.0 https://www.apollographql.com/docs/apollo-server/v2/
- Apollo Link -- Composable networking for GraphQL https://www.apollographql.com/docs/link/