Skip to content

Instantly share code, notes, and snippets.

@jexp
Last active September 24, 2015 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jexp/f528552b7a1f9cb4fa2a to your computer and use it in GitHub Desktop.
Save jexp/f528552b7a1f9cb4fa2a to your computer and use it in GitHub Desktop.
Example Graph Gist

Example Graph Gist

Set Up a Graph to Show You and Your Likes

CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Neo4j" })
RETURN you, like, us

Render results as a graph with: //graph_result like this:

Or the full graph with //graph

Query the Graph to Show All the Things You Like

MATCH (you:Person {name:"You"})-[like:LIKE]->(liked)
RETURN you.name AS who, type(like) AS how, liked.name AS what

Render the results as a table with: //table like this:

Note
This document is a GraphGist itself, so you can use the green Page Source button on top of the page to see the original AsciiDoc document.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment