Full Stack Graph In The Cloud
With Neo4j AuraDB, GitHub Actions, GraphQL, Next.js, & Vercel
William Lyon, Neo4j
@lyonwj
lyonwj.com
Neo4j Connections
Dec 2021
dev.neo4j.com/connections-fullstack
About Me
William Lyon
Developer Relations Engineer, Neo4j
@lyonwj
lyonwj.com
Co-host GraphStuff.FM podcast
3
The Neo4j Graph Data Platform
Analytics &
Data Science
Tooling
Graph
Transactions
Data Orchestration
Development &
Administration
Drivers & APIs Discovery & Visualization
Graph
Analytics
AI
BUSINESS USERS
DEVELOPERS
ADMINS
DATA
ANALYSTS
DATA
SCIENTISTS
APPLICATIONS
Cloud
Lobsters Graph
lobste.rs
lobste-rs-graph.vercel.app
Lobsters Graph Architecture
How do I get data into Neo4j? How do I build the
API layer & expose
data from Neo4j to
my application?
How do I work
with graphs on
the frontend?
How do I deploy my application?
6
How do I get data into Neo4j?
Spoiler alert: Cypher!
dev.neo4j.com/neo4j-aura
lobste.rs/hottest.json
Graph Data Modeling
Iterative process:
1. What are the entities? → Nodes
2. How are they connected? → Relationships
3. What are the attributes? → Node/rel
properties
4. Can I traverse the graph to answer my
business requirements? → If no, iterate
arrows.app
Working With JSON Data In Cypher
neo4j.com/labs/apoc/4.3/import/load-json
Working With JSON Data In Cypher
neo4j.com/labs/apoc/4.3/import/load-json
Working With JSON Data In Cypher
???
GitHub Actions - Flat Data
next.github.com/projects/flat-data
GitHub Actions - Flat Data
next.github.com/projects/flat-data
GitHub Actions - Flat Graph
github.com/marketplace/actions/flat-graph
github.com/marketplace/actions/flat-graph
19
How do I build the API layer?
Spoiler alert: The Neo4j GraphQL Library!
The Neo4j GraphQL Library
For building Node.js GraphQL APIs with Neo4j.
The fundamental goal of the Neo4j GraphQL Library is to make it easier to
build GraphQL APIs backed by Neo4j.
What is GraphQL?
GraphQL.org
An API query language and runtime for building APIs
The Neo4j GraphQL Library
● JavaScript library for building Node.js
GraphQL APIs backed by Neo4j
● Generate GraphQL CRUD API from
type definitions
○ Auto-generate resolvers
● Generate single Cypher query from
GraphQL request
● Extending GraphQL with Cypher
● Built-In Authorization
dev.neo4j.com/graphql
GraphQL First Development
Auto-generate GraphQL CRUD API
Query/mutation fields, ordering, pagination, complex filtering, geo/date types,...
Generate Cypher From GraphQL
Extend GraphQL With Cypher @cypher GraphQL Schema Directive
https://neo4j.com/docs/graphql-manual/current/type-definitions/cypher/
GraphQL API
28
How do I work with graphs on the
frontend?
Spoiler alert: GraphQL!
What is Next.js?
Next.js is a web framework built on
top of React that adds many
features and conventions that aren't
available by default with React.
● server side rendering
● file based routing
● image optimization
● code splitting and bundling
● server-side API routes https://nextjs.org/
Apollo Client
apollographql.com/docs/react/
Graph Data Visualization
react-force-graph
github.com/vasturiano/react-force-graph
What Is Vercel?
● Deployment platform for
developers
https://vercel.com/
Deploy Our Full Stack Graph Application
With Vercel
● Sign Up/In to Vercel
● Import your GitHub repo
● Be sure to set environment variables!
lobste-rs-graph.vercel.app lobste-rs-graph.vercel.app/api/graphql
github.com/johnymontana/lobste.rs-graph
Full Stack Graph Visualization With GraphQL & Neo4j AuraDB
dev.to/lyonwj/series/13842
Neo4j Livestream
dev.neo4j.com/videos dev.neo4j.com/twitch
43
Resources
Neo4j AuraDB Free
https://dev.neo4j.com/neo4j-aura
neo4j.com/graphacademy/training-graphql-apis/enrollment/
dev.neo4j.com/graphql
The Neo4j GraphQL Team Is Hiring!
neo4j.com/careers or email graphql@neo4j.com
About Me
William Lyon
Developer Relations Engineer, Neo4j
@lyonwj
lyonwj.com
Co-host GraphStuff.FM podcast

Full Stack Graph in the Cloud