# Creating Connections

## Method 1: Node Relationships (Easier)

Add parent/child relationship fields to your node data type using [Node parents field](/reactflow-for-bubble.io/element-reference/fields.md#node-parents-field) or [Node children field](/reactflow-for-bubble.io/element-reference/fields.md#node-children-field) (ID or list of IDs). For example, each node can have a "Parent node" field referencing another node's ID. The plugin automatically creates edges between related nodes when loading.

We use this method in [**Main Demo**](https://react-flow-demo.bubbleapps.io/version-test).

## Method 2: Separate Edge Data (More Flexible)

Create a separate "Connection" data type with [Edge source field](/reactflow-for-bubble.io/element-reference/fields.md#edge-source-field) and [Edge target field](/reactflow-for-bubble.io/element-reference/fields.md#edge-target-field). Load both node and edge lists in the [Load nodes and edges](/reactflow-for-bubble.io/element-reference/actions/load-nodes-and-edges.md) action.

See this method in action in [**Node Relationships Demo**](https://react-flow-demo.bubbleapps.io/version-test/node-relationships-demo).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://enhancio.gitbook.io/reactflow-for-bubble.io/getting-started/creating-connections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
