# Create Graph

```csharp
using Databrain.Logic;

public class LogicGraph : GraphData{}
```

To create a new graph, simply select the Logics type in the type list of the Databrain editor and create a new DataObject (Graph).

Every graph starts with an **OnStart** node. You can have as many OnStart nodes as you like in one graph.

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2F3AbkxW8ZtKN1B2qWDrTF%2FnewNode.gif?alt=media&#x26;token=ff08f999-972c-4c81-acf0-1ebe3961c369" alt=""><figcaption></figcaption></figure></div>

## Add Node

Right click on the editor canvas to open up the node panel. Here you can search for a node or browse through the different categories.

## Connect Node

To connect a node with another one, simply click on the output and drag the connection to the next node. The node panel opens up automatically when dragging on an empty space which lets you select a new node to connect to.

## Group Nodes

<div align="left"><figure><img src="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FJwpNWSRsBVTcQYRiAPRs%2FnewGroup.gif?alt=media&#x26;token=1aed3ca3-fd8f-4771-b0a7-8781079a7e4c" alt=""><figcaption></figcaption></figure></div>

To group nodes, simply select the nodes you want to group and use the shortcut Ctrl + G. Alternatively, you can also click on the Create Group-button in the toolbar of the node editor.

You can rename a group by clicking on the name of the group.

Resizing a group evaluates which nodes are in a group and adds or removes them from a group automatically.
