This document discusses using GraphQL and Neo4j together for building modern applications. It notes that the Neo4j GraphQL library allows for low-code, secure and flexible querying of graph data from Neo4j using GraphQL. An example is provided showing how a GraphQL query is translated to a Cypher query to retrieve movie title and runtime data from Neo4j.
2. “Think in graphs, not endpoints.”
Lessons From 4 Years of GraphQL by Lee Byron, GraphQL Co-Inventor.
“Everything is a graph.”
Lessons From 4 Years of Neo4j as a pre-sales by Nicolas Rouyer.
https://www.howtographql.com/basics/1-graphql-is-the-better-rest/
3. Your friendly speaker
Nicolas Rouyer
Sales Engineer @neo4j (4+years)
I like stickers!
Violinist
@rrrouyer
nico@neo4j.com
6. Neo4j Inc. All rights reserved 2023
Image showing case study goes here
Placeholder
CATERPILLAR
Unlocking insights for
efficient equipment repair
and maintenance across
tens of millions of technical
documents was an
enormous challenge for
Caterpillar.
7. Data, meet Graph.
Graph creates a more intuitive and connected view of data
relationships, unlocking deeper understanding and context
8. The property graph -simply powerful
:Employee
:Analyst :City
:Company
name: Amy Peters
date_of_birth: 1984-03-01
employee_ID: 1
:WORKS_AT
start_date: 2008-01-20
:LOCATED_IN
Relationships can have any
number of properties
(name/value pairs)
Relationships are directional
(but can be queried in either direction)
Nodes can have any
number of properties
(name/value pairs)
Nodes represent
entities (typically
nouns)
Relationships connect nodes
(typically verbs)
Nodes can have zero or
more labels (roles)
9. Neo4j Inc. All rights reserved 2023
By 2025, graph will be
used in 80% of data and
analytics innovations
10. Neo4j Inc. All rights reserved 2023
Real-Time
Recommendations
Fraud
Detection
Network &
IT Operations
Master Data
Management
Identity & Access
Management
Risk &
Compliance
REVEALING NEW WAYS TO SOLVE THE WORLD’S
MOST PRESSING BUSINESS PROBLEMS
11. Neo4j Inc. All rights reserved 2023
The first-ever graph database
Creator of the market category
Continued market leader
300
1B+ Enterprise
customers
$500M
in funding
170+
Global partner
ecosystem
250K
Community of developers
and data pros
100M+
Downloads
13. GraphQL - a syntax to query data as a graph
type Project {
name: String
tagline: String
contributors: [User]
}
{
project(name: "GraphQL") {
tagline
}
}
{
"project": {
"tagline": "A query language for APIs"
}
}
Describe your data Ask for what you want Get predictable results
Source: graphql.org
● Generally used to download server data to client
● GraphQL 3 main features:
○ Allows the client to specify exactly the data it needs
○ Facilitates the aggregation of data from multiple sources
○ Uses a system of types to describe the data
=> No more over-and under-fetching
14. The @neo4j/graphql library
The @neo4j/graphql library is a "translation" library:
● Converts a client request into Cypher code
● Use type definitions
● Is low-code or even zero-code
16. Cypher Translation
query FindMovie {
movie(title: "The Terminator") {
title
runtime
}
}
query FindMovie {
movie(title: "The Terminator") {
title
runtime
}
}
query FindMovie {
movie(title: "The Terminator") {
title
runtime
}
}
query FindMovie {
movie(title: "The Terminator") {
title
runtime
}
}
MATCH (m:Movie)
WHERE m.title = "The Terminator"
RETURN m { .title, .runtime }
MATCH (m:Movie)
WHERE m.title = "The Terminator"
RETURN m { .title, .runtime }
query FindMovie {
movie(title: "The Terminator") {
title
runtime
}
}