---
title: 'Graph'
description: 'Explore records and their relationships as a graph on a canvas.'
---

# Graph

Graph draws records as nodes and relationships as lines, so you can see how the data of a project hangs together: which brand a product belongs to, which orders a customer placed, which categories share products. It is built in; open it from the app rail. Every node comes from the project GraphQL API with the signed-in member's access, so roles and spaces apply as they do in Desk.



## Put records on the canvas

- **Search a record** in the sidebar. A hit lands on the canvas together with the first page of each of its relationships, and is selected.
- **Start from an entity** to draw a sample of its records. They arrive without relationships; expand the ones you care about.
- **Open in Graph** from a Desk list draws the selected records, or a sample when nothing is selected. Up to five selected records are expanded one hop.
- **View in Graph** in a record drawer draws that record expanded one hop.

Nodes are coloured per entity and captioned with the entity's display attribute in the current scope. The legend under **On canvas** counts the nodes per entity; untick an entity to hide its nodes without removing them.

## Expand, hide, pin

Click a node to select it; double-click it to load the first page of every relationship. Right-click opens a menu with **Expand all**, **Expand** by relationship, **Hide**, **Hide others** (keeps the node and its neighbours), **Pin position** and **Open record**. Dragging a node pulls its unpinned neighbours along while the rest of the canvas stays still, so a cluster can be pulled apart to look at it; the node is pinned where you drop it, so the layout stops moving it.

The toolbar over the canvas fits the whole graph into view, expands or hides the selection and clears the canvas. The status line counts nodes and relationships.

## The inspector

The selected node's panel lists its scalar attributes in the current scope and every relationship with how many related records are on the canvas out of the total, for example `25 of 56`. **Expand** loads the next 25; the button disappears once every related record is on the canvas. **Open record** opens the same drawer as Desk.

## Query

The **Query** switch over the canvas opens an editor for any GraphQL query against the project, with completion and validation from the deployed schema. The editor picks up a deployment the Studio sees, such as a schema change approved in chat; after a deployment from the CLI, reload the page to get the new fields. Run it with **Run**, or with Ctrl+Enter (Cmd+Enter on a Mac) while the cursor is in the editor.

The canvas draws the records the result contains. Every object with an `_id` whose type is an entity becomes a node, under whichever root field or alias it arrives, such as `products`, `productsConnection` or `latest: products`. A relationship field selected on such a record, as a list or as a connection, yields a line to each related node; an aliased relationship such as `maker: brand` draws no line, though the table and the JSON view still show it. Scalar fields and root fields that are not entities, such as `productsTotal`, draw nothing. A node is captioned with the entity's display attribute when the query selects it, else with the first text field selected, else with its id. The result is also shown as a table of the root records and as JSON.

A run whose result draws at least one node replaces the canvas unless **Add to the current canvas instead of replacing it** is ticked, which merges the result into what is there. A run that fails leaves the canvas as it was; a run that returns partial data with errors adds the partial data to the canvas without clearing it and shows the errors. **Examples** writes a starting query for each entity that has relationships. The last query is remembered per project in the browser.

## Limits

A canvas holds at most 2,000 nodes; when a load would exceed that, the status line says how many records were left out. Relationships load 25 related records at a time, so a hub such as a category with thousands of products never floods the canvas. The Query view's table lists the first 200 root records and the canvas keeps to its 2,000-node cap; the JSON view holds the whole result.


---

[View full sitemap](/docs/sitemap.md)
