# Manage Subquery

This section will guide you on how to manage a subquery.

* [Create Subquery](#create-subquery)
* [Deploy Subquery](#deploy-subquery)
* [Query Subquery](#query-subquery)
* [Delete Subquery](#delete-subquery)

***

### Create Subquery

{% hint style="warning" %}
The node needs to be in the live state for you to add a subquery to it.
{% endhint %}

**Step 1: Subquery Nodes** - Navigate to the [**Subquery Nodes**](https://app.traceye.io/subgraph/subquery) page on the platform. Here you will see a list of nodes that you purchased and the ones that are already deployed. Now, click on the **Add Subquery** buttons.

<figure><img src="/files/ISPa1eZTlyuCq81Fa6s6" alt=""><figcaption></figcaption></figure>

**Step 2: Enter Details -** Provide a name, rpc endpoint and choose the node for your subquery. Now, click on the **Add** button to create a new subquery.\
NOTE: If only one node is live then it will be pre-selected.

<figure><img src="/files/16BZk7C2FwdfyUi3xWU5" alt=""><figcaption></figcaption></figure>

On successful creation, you will be redirected to the subquery detail page.

<figure><img src="/files/lmLez19uhEwNcgIEgwyx" alt=""><figcaption></figcaption></figure>

***

### Deploy Subquery

**Step 1:** Navigate to the **Details** section on the subquery detail page. Now, click on the **Deployment Command** button.

**Step 2:** Follow the steps provided on the screen to deploy your own subquery.

<figure><img src="/files/p4ZM4TAiKnH87YrNvOaa" alt=""><figcaption></figcaption></figure>

***

### Query Subquery

{% hint style="warning" %}
The subquery must be deployed and indexed before it can be queried.
{% endhint %}

On the subquery detail page, navigate to the **Query URL** section. Click on **Redirection** icon to open the **GraphiQL** query editor on a new tab, or click on **Copy**  icon to copy the query URL.

<figure><img src="/files/Vbg2ZVzi5RXwT8Jxlewv" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/v4ZVac5acKDnLN6mlBwr" alt=""><figcaption></figcaption></figure>

***

### Delete Subquery

On the subquery detail page, click on the **Delete** button on the top right corner of the screen.

<figure><img src="/files/PG1Ea8InDpopj6PvO42O" alt=""><figcaption></figcaption></figure>

Now, click on the **Continue** button to delete the subquery.

<figure><img src="/files/HrN4whA6hGDyAx9Xd4bu" alt=""><figcaption></figcaption></figure>


---

# 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://doc.traceye.io/services/dedicated-indexing/subquery-nodes/subquery-manual/manage-subquery.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.
