Skip to content

Instantly share code, notes, and snippets.

@peterneubauer
Last active December 18, 2015 23:28
Show Gist options
  • Save peterneubauer/5861321 to your computer and use it in GitHub Desktop.
Save peterneubauer/5861321 to your computer and use it in GitHub Desktop.

The simplest GraphGist

This Neo4j GrgaphGist shows the basics of using AsciiDoctor syntax and a few additions for GraphGists, namely //console for a live console, and //table1, //graph1 and //output1 comment elements to visualize queries with the corresponding number.

Click on the upper navbar to see the source for this Gist.

Show a live query console

//console

becomes

Use [source,cypher] source blocks to define a Cypher query

[source,cypher]
----
CREATE (n{name:'cypher'})-[:LIKES]->({name:'icecream'}) return n.name, ID(n) as id
----

becomes

CREATE (n{name:'cypher'})-[:LIKES]->({name:'icecream'}) return n.name, ID(n) as id

Show a graph visualization for the results from Query 1

//graph1

becomes

Show a result table for Query 1

//table1

becomes

Show the raw output from Query 1

//output1

becomes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment