Search⌘ K

Query the Book Graph

Explore how to query the book graph in Neo4j using Cypher. Learn to retrieve node IDs and properties, examine relationships, and analyze paths including finding the longest path. This lesson helps you build foundational skills to query property graphs effectively.

We'll cover the following...

Nodes

We can now test the book graph by querying over all the nodes.

XML
iex> "MATCH (n) RETURN id(n), labels(n)" |> cypher!
iex> "MATCH (n:Author) RETURN id(n), properties(n)" |> cypher!

Line 1: We get system IDs and labels.
Line 3: We get system IDs and properties for those nodes with an Author label.

It’s worth pointing out here that there might be some confusion between the system ID ...