Michał Tyszkiewicz
6/30/2021
A booming market has created the demand for reducing the time to market of software products to a minimum. The current trend is pushing app development more and more towards versatility and speed to market, which has caused tools like GraphQL to gain prominence and as more and more people get into GraphQL they in turn look for tools that make it easier to use for them. If you’re thinking about working with GraphQL the first thing that comes to mind is obviously the schema and wouldn't you know it, there’s a little something that can help you working on that.
Enter Neo4j, a graph database management system. Honestly even going by that, combining GraphQL with a graph database sounds like a no brainer but there’s a bit more to it than that. Since GraphQL treats app data as a graph, a graph backend like Neo4j fits it like a glove. Neo4j is written in Java but is very versatile and translates data from sources written in other languages into Cypher queries which makes it perfect for GraphQL and its SDL (Schema Definition Language) The connection isn't something that happened by chance as Neo4j has been involved with GraphQL for years and has supported the GRAND stack for quite a while as well. Let’s look at the key features of the database itself:
In April Neo4j released the Neo4j GraphQL Library, a tool which makes using the two even easier and more beneficial. It's designed to be a low code library aimed at fully utilising the power of connected data in API development. It basically acts as an intermediary between your GraphQL client and the Neo4j database making sure everything works smoothly between frontend and backend development. In more technical terms because GraphQL uses a schema and type safe SDL the library is written in TypeScript and takes a schema-first approach as well minimizing the amount of backend code needed. Let’s look at what it does for you:
All in all the library does exactly what it promises and if you’re already using GraphQL that's a good enough reason to check it out. The benefits of using Neo4j are pretty apparent in and of itself and, as mentioned before, it just fits GraphQL perfectly. You can also use it along with some of the popular frameworks like React, Vue, Angular and others to get even more out of it, but we'll take a look at that next time when we check out the GRAND stack.