> For the complete documentation index, see [llms.txt](https://doc.traceye.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.traceye.io/services/dedicated-indexing/subquery-nodes/subquery-manual/manage-subquery.md).

# 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="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2FB1lWEMAvjaUw2LounxSP%2Fimage.png?alt=media&amp;token=2257f698-c316-4081-a678-5452c9625f9b" 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="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2FHIE6QlDm939hZwcoDPvD%2Fimage.png?alt=media&amp;token=0d573eac-a1b2-45b3-95ac-d07bd76d383d" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2Fqwlm97McSZuTPD9Jd3NA%2Fimage.png?alt=media&amp;token=46f905d3-3dbc-4041-b17b-8f78e42754ed" 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="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2F0tKghrSdDdkRYsQk89Ku%2Fimage.png?alt=media&amp;token=2e217ef4-c02c-4064-9874-20034606104c" 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="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2Fh0zWvacO6kEOTFlFZanW%2Fimage.png?alt=media&amp;token=3ad056be-7f25-4e1f-bb61-8a9ffe8a2abd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2FZDGPVwRZtJvY6amgVJAJ%2Fimage.png?alt=media&amp;token=d91ea079-6b85-40b6-a4ff-af18ceb82a94" 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="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2FkWJXv67ejdzTkhRRXgkS%2Fimage.png?alt=media&amp;token=6da973c4-d2e1-4735-abbe-eab31f8ac9e2" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://461237800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBtdewVLJM1K7okWyOstj%2Fuploads%2Fc8pTa2Hq6cmvIHdPdmiT%2Fimage.png?alt=media&amp;token=c533f3a1-66f0-40ad-a7c4-48dce5be02ea" alt=""><figcaption></figcaption></figure>
