# The Graph

The Graph, a decentralized protocol for indexing and querying blockchain data, now officially supports IoTeX. This integration allows developers to create open APIs, known as subgraphs, to efficiently access and organize data from the IoTeX blockchain. With The Graph, IoTeX developers can enhance their dapps by retrieving information seamlessly, improving functionality and user experience without relying on centralized data providers.

## Quick Start

Dapp developers can refer to the official The Graph documentation to create their Subgraphs for IoTeX:

[→ The Graph Quick Start Guide](https://thegraph.com/docs/en/quick-start/)&#x20;

Once the Subgraph is created inside The Graph Studio, it's enough to initialize it as usual with the official CLI and select ethereum as the protocol and iotex as the network:

```sh
graph init --studio <SUBGRAPH_SLUG>
```

{% hint style="info" %}
You can copy the command above directly from your subgraph page to include your specific subgraph slug.
{% endhint %}

You’ll be prompted to provide some info on your subgraph, make sure you select **`ethereum`** as the protocol, and **`iotex`** as the network:

<figure><img src="https://content.gitbook.com/content/EyawgxYexImpo6OGzEiR/blobs/HeR9oPth0uSxmwJh3C9H/image.png" alt=""><figcaption></figcaption></figure>

Simply have your contract verified on the block explorer and the CLI will automatically obtain the ABI and set up your subgraph. The default settings will generate an entity for each event.

## Additional resources

* To explore all the ways you can optimize & customize your subgraph for a better performance, read more about [creating a subgraph here](https://thegraph.com/docs/en/developing/creating-a-subgraph/).
* For more information about querying data from your subgraph, read more [here](https://thegraph.com/docs/en/querying/querying-the-graph/).


---

# 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://docs.iotex.io/blockchain/build/web3-development/chain-indexing/the-graph.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.
