Skip to content

Instantly share code, notes, and snippets.

@mneedham
Forked from nawroth/GraphGist-simple.adoc
Created October 1, 2013 06:49
Show Gist options
  • Save mneedham/6774712 to your computer and use it in GitHub Desktop.
Save mneedham/6774712 to your computer and use it in GitHub Desktop.

A simple GraphGist

You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page.

Click on the Page Source button in the menu to see the source for this GraphGist!

Include a query console

//console

becomes:

Note
Put the console before any queries!

Define a Cypher query

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

becomes:

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

Queries are executed in the order they appear on the page during rendering, so make sure they can be performed in that order. Each query has a green or red button to indicate if the query was successful or not. The console is set up after the executions, with an empty database, for the reader to play around with the queries.

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