As application development shifts towards modern architectures, with an emphasis on flexibility and speed to market, tools like GraphQL are redefining API design and client-server interaction to improve the experiences of developers.
Modern, intelligent applications of today require APIs and libraries that are open, flexible, and easy to build, while also providing tighter integration between the front-end and the backend development process.
Enter the Neo4j GraphQL Library
Today we are announcing the general availability of the Neo4j GraphQL Library: an extensible, low-code, open source library designed for building API-driven, intelligent applications faster by tapping into the power of connected data.
“I am absolutely blown away how easy it is to spin up a GraphQL API on top of my Neo4j database. Incorporating user authentication was a breeze; freeing me up to explore user roles and permissions. The authentication/authorization is straightforward and easy to grok. So easy a drummer can do it!” – Rob Brennan, Consulting Architect, GenUI (and Drummer)
Why use the Neo4j GraphQL Library?
GraphQL treats application data as a graph, hence a graph backend like Neo4j is a natural fit for GraphQL.
Neo4j and GraphQL have a mutually beneficial relationship; the type safety and schema of GraphQL make Neo4j easier to work with where type safety and a strict schema is useful. 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.
Neo4j is optimized for graph traversals, bringing performance optimizations to GraphQL implementations. Choosing a backend like Neo4j to build modern applications – that is proven and scale tested with 800+ enterprise customers – gives developers the freedom to focus on the API and the application code. The rest is left to Neo4j at the backend.
Benefits of the Neo4j GraphQL Library:
The Neo4j GraphQL Library:
- Translates GraphQL queries into a single Cypher query, eliminating unnecessary database calls and solving the N+1 query problem. Developers using this library can focus solely on building applications while writing minimal backend code – the library handles the rest.
- Simplifies modernizing applications for exceptional performance, business results, and user engagement. Developers can create predictive, mission-critical, and context-aware apps with data-rich APIs that are more secure (using Auth) and reliable.
- Generates Cypher from GraphQL, GraphQL CRUD API from type definitions, auto-generated resolvers, and allows custom logic with @cypher schema directive. The library also comes with powerful authorization to secure your GraphQL API, nested mutations, and an OGM (Object-Graph-Mapper).
- Has a low learning curve, helping developers quickly build API-driven applications across open source frameworks (React, Vue, Angular, and others) and achieve exceptional flexibility to deploy across on-prem, cloud, or in a serverless setup.
- Gives access to Cypher query language for expressing complex graph traversals and custom graph-native logic.
“TypeScript + @neo4j + @neo4j/graphql + Apollo + AWS Lambda + Pulumi makes for an awesome API prototyping stack, and gives you tons of power up front so you don’t have to write as much cypher.” – Noël Jackson, Developer, noeljackson.com
Benefits of the Neo4j Graph Database:
The Neo4j native graph database:
- Makes complex and multi-hop graph traversals highly performant to provide blazing-fast query response for applications.
- Has a native graph data model mapping for graphs in the GraphQL schema.
- Quickly traverses recursive or variable length paths that are difficult to impossible in non-graph data models using relationship pointers.
- Optimizes query performance with unlimited scale, especially for connected data queries that would require complex JOINS in relational databases.
- Shortens read time with index-free adjacency, and maintains fast transactions as your data complexity grows.
“I’m so excited! I have the feeling all my requirements are taken into account by the new API. I really, really love the new library and the efforts that Neo4j is taking to provide better integration of the database into the application layer, especially for a GraphQL API.” – Robert Schäfer, Full-Stack Engineer
The Strong Open Source and GraphQL Foundation
GraphQL is not new to Neo4j. Neo4j is a founding member of the GraphQL Foundation, and has supported the evolution of GraphQL for years.
The formation of the GraphQL Foundation is an important step to ensure GraphQL has the vendor neutral platform it needs to continue its rapid adoption in the future. Neo4j plans to keep investing in GraphQL integrations and GRANDstack, and providing developers and community a path to keep building with GraphQL, as well as create a standard for building APIs.
Get Started Today
The Library is open sourced and is available on GitHub Learn more about step-by-step implementation of the library in this blog on the beta release of the Neo4j GraphQL Library. Take a deep dive into the Neo4j GraphQL Library and it’s mechanics in our Technical Blog.
For further and deeper learning register for “Building GraphQL APIs Using the Neo4j GraphQL Library” course work on GraphAcademy. To play with a pre-canned, ready to use environment, jump right into Neo4j Sandbox.
Leonhard Euler Idea Contest
Also with the launch of Neo4j GraphQL Library, we’re thrilled to announce the Leonhard Euler Idea Contest, and a chance to win $10K in cash prizes and showcase your creativity to the world!
Whether you’re a developer or just love technology, we invite you to submit your idea that uses the Neo4j graph database and Neo4j GraphQL Library for an exciting or innovative application. The winning projects will be featured at NODES 2021, the world’s biggest online developer expo and summit! To learn more about the contest, check out our blog on criteria, terms, and conditions.
The first 100 registrants get access to Aura Free Tier, a fully managed, zero-admin graph database for the cloud developer. Use this form once you’ve registered!