World Cup 2018 is into its 3rd week and we felt it was about time that we refreshed the previous World Cup Graph that we created for the World Cup in Brazil 4 years ago.
We've also put a GraphQL API on top of it so that people who are not familiar with Cypher can query the dataset.
In this session we'll explain how we built the graph, show how to use it to answer some fun questions, and show off the GraphQL API that we built on top of the database using the GRANDstack starter kit.
14. LOAD CSV WITH HEADERS FROM
"file:///matches.csv" AS csvLine
MERGE (match:Match {id: csvLine.id})
SET match.h_score = csvLine.h_score,
match.a_score = csvLine.a_score
...
Building the graph
21. GraphQL is a query language for your API, and a
server-side runtime for executing queries by using a
type system you define for your data.
What is it?
22. GraphQL is a query language for your API, and a
server-side runtime for executing queries by using a
type system you define for your data.
What is it?
23. GraphQL is a query language for your API, and a
server-side runtime for executing queries by using a
type system you define for your data.
What is it?
24. GraphQL is a query language for your API, and a
server-side runtime for executing queries by using a
type system you define for your data.
What is it?
type Planet {
name: String
climate: String
}
type Character {
name: String
friends: [Character]
homeWorld: Planet
species: Species
}
type Species {
name: String
lifespan: Int
origin: Planet
}