courses:semint:lab_beyond

  • Beyond the Semantic Web lecture – part about Cypher and GraphQL (slides are on the main page)

1. Introduction to Cypher [45 minutes]

  • We will explore the Movie Graph! with the Neo4j tools. First of all, follow one of the following links to create your own Movie Graph instance (there is a need to create an account):​
  • If you are using sandbox, the Movie Graph is already loaded.
    • If you are starting with blank project, first load the Movie Graph by putting :play movie-graph in the neo4j console
  • Then explore the graph by creating the following queries in Cypher. If you need some help, take a look at the documentation.
  1. Select any 5 nodes​
  2. Select any 5 relations​
  3. Select subject, predicate and object for 5 triples​
  4. Find one Person​
  5. Find Person named 'Tom Hanks'
  6. Find movies in which Tom Hanks acted​
  7. Find co-actors of Tom Hanks​
  8. Find the path between the Tom Hanks and Meg Ryan​
  9. Find title and release date of movies in which Tom Hanks acted (see Q6)​
  10. Sort the movies (from Q9) by release date (descending order)​
  11. Select only movies released in the 1990s (from Q10)​
  12. Count these movies (from Q11)!

2. Introduction to GraphQL [35 minutes]

  1. First of all, run the default query (loaded when the playground starts)
  2. But wait, how do one find out which fields are available in the dataset?
    • Use the Introspection to query the schema to get the information about possible values for Country class!

3. The Graph of Thrones [any time]

  • If you want to get to know the Cypher language better, check out this tutorial, which introduces a lot more elements of the language using the Game of Thrones graph as an example!
    • To start the tutorial, simply enter :play https://guides.neo4j.com/got_wwc in neo4j console

Cypher

GraphQL

  • courses/semint/lab_beyond.txt
  • Last modified: 22 months ago
  • by kkt