By Michael Hunger & William Lyon, Developer Relations | November 2, 2017
The Neo4j Developer Relations team is tasked with making sure developers can build applications backed by Neo4j using their favorite technologies. One technology we’ve been really excited about recently is GraphQL.
GraphQL is a relatively new paradigm for building APIs. You can learn more about GraphQL by reading this ref-card. The DevRel Engineering team has spent some time building integrations around GraphQL and Neo4j, and we’re happy to share them with you!
Already in its second year, GraphQL Summit is a developer-focused conference showcasing how developers are using GraphQL. At GraphQL Summit, Will and Michael presented our integrations of GraphQL for Neo4j.
We really enjoyed the conference, and spoke to a lot of developers from startups and surprisingly a significant number of large companies that started to use GraphQL to unify their API landscape and make it easier to develop applications. The talks covered a wide range of uses, initiatives, problems and solutions around GraphQL. We were especially thrilled by topics around subscriptions, authentication and open source announcements and launches by IBM, Apollo and Graphcool.
One prominent theme at GraphQL Summit this year was on the ecosystem of tools being developed and made available to the community. This included a new release of the most popular GraphQL client, Apollo Client 2.0.
The 2.0 release makes Apollo Client more modular, allowing for more customization and incremental adoption. Apollo Client includes integrations with many frontend frameworks, including React. You can see an example of Apollo Client 2.0 as part of a simple GRANDstack app here. Apollo also demonstrated Engine, their tool for performance tracing, schema management, error tracking and caching.
We unveiled an early version of
We’re happy to announce the launch of GRANDstack (GraphQL, React, Apollo, Neo4j Database) just in time for GraphQL Summit. GRANDstack is a combination of technologies and integrations to enable full-stack development, taking advantage of synergies and symbiotic relationships between technologies in the stack.
Full-stack developers have an amazing choice of technologies available to them and it’s important to move beyond the LAMP and MEAN stacks as technologies have evolved. GRANDstack is our take on how to realize developer productivity and performance from modern tools.
GRANDstack builds on integrations between technologies, such as
neo4j-graphql-js, providing a prescriptive and opinionated combination of technologies and integrations for building full-stack applications. Our approach of combining the power of the graph-based data model of Neo4j with the expressiveness of the GraphQL schema and queries was well received at GraphQL Summit.
By inspecting the GraphQL query and schema we’re able to generate a single Cypher query that efficiently retrieves the requested data from Neo4j. We can also generate query types and mutations for the types in your schema.
This means less boilerplate code for GraphQL resolvers for fields, query types and mutations. Incidentally it also saves you from updating all those resolver queries when refactoring your schema. Running just one query against your backend database doesn’t suffer from the n+1 query issue that usually arises from sending one query per field resolver.
To add the power of Cypher to your application, you can either annotate fields, mutations or query types with
@cypherdirectives, e.g., to return recommendations, tree summaries or shortest paths as computed information, or to just handle common cases for querying and updating through Cypher.
If you want to learn more, visit grandstack.io or attend one of our upcoming GRANDstack meetups or training classes. You can also see the slides from Will’s presentations at GraphConnect New York here on
neo4j-graphql-jsand a GRANDstack overview from the San Francisco JS Meetup here.
Neo4j-GraphQL Apollo Launchpad Challenge
Fork our example Apollo Launchpad and win a neo4j-graphql hacker T-shirt and sticker!
You can see an example of in this Apollo Launchpad that shows a GraphQL server providing an endpoint for a simple Movie Graph. To try it out, you just fork the launchpad and spin up a Neo4j Recommendations Sandbox and add the credentials as secrets.
This gives you not just a running GRANDstack backend but we’ll also send you a T-shirt and sticker if get your forked Launchpad working with Neo4j. Just tweet out the URL for your working Launchpad with #GRANDstack and #Neo4j to claim your t-shirt and sticker.
Click below to register for our online training class, Introduction to Graph Databases and master the world of graph technology in no time.
Sign Me Up
About the Author
Michael Hunger & William Lyon, Developer Relations
Michael Hunger has been passionate about software development for a very long time. For the last few years he has been working with Neo Technology on the open source Neo4j graph database filling many roles. As caretaker of the Neo4j community and ecosystem he especially loves to work with graph-related projects, users and contributors. As a developer Michael enjoys many aspects of programming languages, learning new things every day, participating in exciting and ambitious open source projects and contributing and writing software related books and articles.
William Lyon is a Developer Relations Engineer at Neo Technology. Prior to joining Neo, William worked as software developer for several startups in the real estate, quantitative finance and predictive API spaces. William holds a Masters degree in Computer Science from the University of Montana.
From the CEO
Have a Graph Question?
Reach out and connect with the Neo4j staff.Stackoverflow
Share your Graph Story?
Email us: email@example.com