How to index Network for your Subgraph: The step-by-step Guide

Web3 applications‚Äô need for reliable, on-chain data is never-ending. Be it a trading app, gaming platform, or¬†NFT marketplaces‚Äď each of these use cases is now tapping into¬†Subgraphs¬†for non-stop and effortless web3 data querying. But, what if you want to query data from a specific network that does not appear on decentralized protocols or with any hosted service providers? Don‚Äôt panic, read this step-by-step guide and index your network for subgraphs.

Why is your Subgraph network missing?

The non-availability of a network means it is not yet indexed on the Subgraph platforms where you find it. For example, if we talk about The Graph Network’s hosted service, it is sunsetting and therefore, does not offer support to many networks. Likewise, you may not be able to find a few networks with any other subgraph providers. There can be two possible scenarios when finding a network for subgraphs is a challenge. Let’s discuss them:

  • The first and most common scenario is when you are¬†deploying a subgraph¬†for a public protocol for which the other providers are not providing a subgraph yet. The reason for this can be anything, maybe the less or somewhat medium popularity of the network, but you are not able to find a reliable infrastructure provider for them.
  • The next scenario is for¬†Layer2 rollups,¬†appchains, and permissioned EVM chains. Let‚Äôs say you want to¬†deploy a subgraph¬†for a¬†CDK chain¬†or a¬†Zksync hyperchain, which was developed recently. The same goes for appchains and permissioned EVM networks like¬†Hyperledger Besu. Getting their network for subgraphs can be difficult.

How to index your network for Subgraph? Step-by-step process.

For both scenarios above‚ÄĒin case of¬†rollup/appchain/permissioned chain or a public protocol,¬†Zeeve‚Äôs subgraph service; Traceye provides an efficient solution. With Traceye, you can index any network of your choice in a low-code, hassle-free way, along with a rapid-fast launch of subgraphs, their management, and consistent scaling.

Here, you will have two options for indexing network for subgraphs; the first is to set up your dedicated Graph node, or else you can opt for a shared subgraph. Let’s dive a little deeper.

Option:1 Setting up dedicated Graph Node for your network

Dedicated graph node is Zeeve’s one of the latest subgraph services, which brings you a dedicated Graph node server with powerful server specs and high storage capacity, enabling you to deploy as many subgraphs as you want, perform endless queries, and store diverse entities according to the query requirements.

Whether you want to index an appchain network, rollup, or permissioned protocol, having a dedicated graph node brings a solution that caters to all sorts of your requirements. Within this dedicated Graph node, there’s a provision to add your own RPC URL. This RPC URL can be of a Layer2 rollup chain, appchain, or any permissioned EVM chains that you want to index and query data out of.

For those who are building production-grade applications and are looking to deploy more than one subgraph, plus those who do not want any limit on queries,  a dedicated subgraph node is an ideal choice. They will get a high throughput archive node RPC URL at a discounted rate. On top of this, dedicated Graph nodes on Zeeve can leverage value-added features like Subgraph webhooks, queries add-on and the option for community subgraph.

Option:2 Indexing your network through shared indexers

Besides setting up a dedicated graph node and¬†Zeeve subgraph service, Traceye offers ‚ÄėShared indexers‚Äô on a subscription-based model. This option is useful for projects in the testing phase that want to index data from any public network,¬†appchain, or¬†rollup. These types of users can opt for shared indexers to perform a limited number of queries. However, Zeeve allows you to buy additional queries with your existing plan. Here‚Äôs the step-by-step process for indexing your custom network with Zeeve.

Step:1 Create account or login to the Zeeve platform.

Step:2¬†Navigate to ‚ÄėHosted Subgraph‚Äô on the dashboard and click on ‚ÄėBuy Subgraph‚Äô to get a¬†custom hosted subgraph service.

You have the option to choose the number of subgraphs, get services like Community Subgraph, and addons like webhook, additional queries, and additional storage entities. Customize your plan as required and complete its payment.

Step:3¬†Again, navigate to¬†Hosted Subgraphs¬†and launch your subgraph. Click on ‚ÄėAdd Subgraph‚Äô or start with ‚ÄėNew Subgraph‚Äô.

How to index Network for your Subgraph

Adding subgraphs will open a drop-down menu, allowing you to create new subgraphs and import any existing ones. Subgraph creation and importing is self-explanatory; hence, let’s discuss community subgraphs.

This feature will allow you to create active subgraphs that are popular across the web3 community and are indexed already on other platforms. This means you don’t need to launch subgraphs from scratch; just activate the popular ones and create a pipeline to index important data from them.

With this option, you can launch and manage a range of subgraphs within a single setup. Let‚Äôs proceed with ‚ÄėNew Subgraph‚Äô as we are currently indexing a new network.

Step:4 Provide your subgraph a name, choose workspace (it can default or customized), and choose your blockchain network from the Blockchain Network drop-down. If your network is present in the list, select it. If it’s not, then choose the custom option.

Step:5 Enter the RPC endpoint of the network for which you want to deploy the subgraph. If you don’t have one, Zeeve will help you get configured RPC URLs for a range of blockchain networks, appchains, and rollups. As you can see in the below image, we have added an RPC endpoint for Astar Network as we will be indexing data from this particular network.

Click on ‚ÄėAdd Subgraph‚Äô and your subgraph will be launched instantly. From the dashboard itself, you can check the status of the subgraph, such as status- deployed/not deployed, block synchronization status, subgraph creation date, and more. Plus, you will get a deployment command to¬†deploy your subgraph¬†and a query url to perform data queries once the subgraph is fully synced.

Here’s the deployment command:

And, the Query URL:

How to index Network for your Subgraph

Rest of the steps will be similar to what we discussed in our previous Subgraph deployment guide. It has covered everything, from subgraph creation (including manifest writing, compiling GraphQL schema, or getting ABI files), importing of existing subgraphs, to webhook enabling. This will allow you to get an in-depth understanding of how you can index a network for Subgraph with Zeeve and in the meantime, you don’t miss anything that is important.

Wrapping up!

As discussed, the whole process of indexing networks for subgraphs is straightforward with the Zeeve subgraph service. Whether it’s about creating a new subgraph from scratch, launching custom networks, or migrating any existing subgraph from a different infrastructure to Zeeve-managed infrastructure,. Also, if you seek hands-on support from our team on building a custom subgraph from ground level, feel free to contact us.  For more information about Zeeve’s Subgraphs services or our comprehensive blockchain services, schedule a call or send us your queries via mail.

Related Articles

Responses