Visual tour

This section walks you through the UI of Neo4j Browser.

Overview

browser ui
Figure 1. Overview of the Browser UI

Connection bar

The connection bar contains three dropdown menus; the connection dropdown, the database selector, and the user information.

In the connection dropdown, you can view connection status, database version, and connection details. Additionally, you can switch instance and disconnect the current instance.

connection dropdown
Figure 2. Connection dropdown

The database selector lets you switch between the databases in the currently connected instance. You can also see which default Cypher® version each database has.

The user information dropdown shows the role(s) associated with the current user and has an option to change database password.

Sidebar

The sidebar contains a set of drawers to set up the environment for graph management and explore your data.

Database Information

This drawer contains information about the database you are connected to.

db information
Figure 3. Database information drawer

It gives you an overview of the node labels and relationship types, as well as which property keys exist in the database. If you select one, you see a sample of the selected element as a graph or table.

Saved Cypher

The Saved Cypher drawer is where you keep your bookmarked Cypher queries and commands. It contains options for adding folders to help organize saved queries, saving selected queries to your Downloads folder, uploading them, and deleting selected items. All items, both queries and folders can easily be dragged up or down into the order you prefer.

saved cypher
Figure 4. Saved Cypher

Save a query

You can save Cypher queries and commands with the bookmark icon in the result frame, from the […​] menu in the editor, or cmd+S/ctrl+S (macOS/Windows or Linux). You can create a new folder or sort your query into an existing folder.

Run a saved query

To run a query from your Saved Cypher drawer, hover it and use the play button to run it directly in the editor. If you click it instead, you populate it into the editor where you can edit it before executing.

History

The history drawer keeps track of all your executed queries, not limited by database. The queries are stored in your browser’s local storage and remain there until the history limit is reached or you clear your local storage. You can set the history limit in the Settings drawer. You can also delete them manually, all or selected queries.

Queries in the history can also be saved to your Downloads folder, either individually selected or all.

The historical queries can be populated to the editor and edited and run from there by clicking on them.

Cypher Reference

The Cypher Reference is an embedded version of the Cypher Cheat Sheet. It allows you to search for Cypher-related terms such as queries, patterns, and clauses, directly in Browser. It is divided into sections and subsections for easy navigation and each subsection can be expanded and collapsed.

cypher reference
Figure 5. Cypher Reference

You can select an example to run it in the editor or copy it to the clipboard. Note that some examples require data you may not have in your database and may not be runnable nor yield desired results, but are used to illustrate syntax and functionality of Cypher.

Many subsections also includes a link to the Cypher Manual for more details.

Parameters

The parameter drawer allows you to set parameters to use in your queries. This can also be accomplished by using the :param command. For more information about using parameters see Query parameters.

parameter drawer
Figure 6. Parameters

Settings

The Settings drawer contains various adjustable settings for the application.

The first part of the drawer contains settings that have to do with the performance of the application. The Visualization node limit controls the number of nodes returned by an initial query. If your query’s results exceeds this limit, you can still add more elements to the graph visualization. Setting any of the limits too high may degrade performance.

The local storage section allows you to save your parameters to use across sessions.

The next part of the drawer is for the Cypher editor. You can control whether your queries can write to the database or not with the Access mode setting.

This setting should mainly be used for load balancing/routing in a clustered environment and is not intended to replace RBAC in terms of restricting access.

To learn more about custom load balancing, see the Neo4j Drivers documentation, specifically the section on Run your own transactions/Request routing, available for the JavaScript Driver, the Java Driver, the Python Driver, and the Go Driver.

The toggle for errors and warnings is used to enable hints to help you find errors in your Cypher queries.

The drawer also contains general and privacy settings.

Additionally, you can change theme, light, dark, or system from this drawer.

settings drawer
Figure 7. Settings drawer

Cypher editor

The Cypher editor is the primary interface for entering and running Cypher queries and commands. The editor can be instantiated several times, which allows you to edit the query inside the result frame and rerun it.

Syntax highlighting

  • A smart highlight of matching pairs around the current position of the cursor, for example, matching brackets, braces, and parenthesis.

  • Matching pairs are auto-closed.

  • A smart highlight of identical words on a word click.

  • Words, such as attributes, anon name, and values, are highlighted in different colors.

  • Any punctuation, such as parenthesis and comma, has a slightly different color than text.

  • Warnings are displayed with a red squiggly line that displays the error if you hover.

Table 1. Useful shortcuts
Description Keyboard shortcut (Mac OS) Keyboard shortcut (Windows and Linux)

Select highlighted identical words one by one.

Cmd + D

Ctrl + D

Move a query line up and down.

option + arrow

ALT + arrow

Delete a query line.

Cmd + shift + K

Ctrl + shift + K

Add multiple cursors, if you want to add several lines at the same time.

option + click + drag

ALT + click + drag

Search and replace.

Cmd + F

Ctrl + F

Run a query.

Cmd+ enter

Ctrl + Enter

Toggle full-screen editor

Cmd + E

Ctrl + E

History search

Cmd + R

Ctrl + R

Save Cypher

Cmd + S

Ctrl + S

Format Cypher

option + shift + F

Ctrl + shift + F

A yellow squiggly line anywhere in your query indicates a warning. This is most commonly caused by a query attempting to match a pattern not present in the graph, but can be caused by a number of things (see List of all notification codes). Hover over the underlined segment to see the explanation.

Reusable result frames

Neo4j Browser reusable result frames allow you to edit the query of an existing result directly in the result frame and re-run it to update the result in situ.

You can also use Cmd/Ctrl + click to send it back to the main editor and re-run it from there.

Each reusable frame maintains its own local history of commands and updates the main one in the Cypher editor, should you need to instantiate a new result frame from there.

Result frame views

Neo4j Browser supports different result frame views to suit your needs:

  • Graph — Display the result as nodes and relationships and allow styling to be configured.

  • Table — Display the result as JSON formatted rows.

  • Raw — Display the submitted request, the Neo4j server version and address, and the response.

For more details on the different ways of viewing data in Neo4j Browser, see Result frames.

Stream

A stream is a scrolling series of result frames.

screen stream
Figure 8. Stream of result frames

A reusable result frame is created for each command execution, added to the top of the stream to create a scrollable collection in reverse chronological order. You can expand and collapse the result frames using the Collapse icon.
To remove all the frames from the stream, use the :clear command.