Build your 1st SubQuery Project in 10 Minutes: Step-by-step Guide
February 6, 2025
|
Nitesh Sharma
share
Launching your 1st SubQuery project just got faster and easier with Traceye– Zeeve’s advanced, new-age data indexing platform for rollups, appchains, and custom Layer2s. You can now complete the whole process, including deployment, management, and scaling for production-grade SubQuery projects, in less than 10 minutes. This detailed, step-by-step guide discusses the whole process of Traceye. Before we dive in, let’s quickly see the specific features of Traceye that makes it an ultimate choice for web3 builders.
Why launch your SubQuery project on Traceye?
Lightning fast data indexing- Traceye offers for 5X faster data fill than normal speed of a Subquery indexer, eliminating unnecessary delays in data retrieval and availability.
Cost-effective indexing- Launching your SubQuery project on Traceye’s hosted service cost just $69. Despite such cost-efficiency, your project will benefit from all the key features like fast indexing, maintenance, monitoring, etc.
Minimized data lag- With Traceye, the retrieval times on your project will be 50% less, and this keeps your application updated with all the latest on-chain data.
Managed services- No more complex infrastructure management, performance tracking, or optimization– Traceye manages all the heavy lifting for you.
Advanced add-ons– Enhance your indexer’s capabilities with add-ons like Traceye BI tool, webhooks, or queries optimization.
Automatic sync- Traceye offers automatic chain re-orgs and manages it seamlessly, ensuring data consistency.
High availability– All your indexing project– be it node or hosted subquery– these will benefit from 99.9% uptime.
Launch your 1st SubQuery indexing project: step-by-step process
Follow the given step-by-step process to launch Subquery on Traceye. As you may know, this requires creation of a SubQuery as per your specific customization and implementation needs. Here’s the brief overview of this process–
Gather all the requirements– Install SubQuery CLI, NodeJS, and Docker.
Initialize your new project. Get started with the subql init PROJECT_NAME command.
Prepare the schema by creating GraphQL entities in it (schema.graphql). This will add custom parameters for the data your SubQuery indexer will extract and persist for further querying. See the example of GraphQL schema here.
Add necessary mapping functions in the src/mappings/ directory. These functions will invoke and transform on-chain data into GraphQL entities based on your defined parameters.
Publish your Subquery project. The top three publishing options include– running the project locally by yourself, publishing to the Subquery Network, or partnering with hosting providers like Traceye.
Run from the hassle of the Subquery launch! Now, finish the whole process in less than 10 minutes. Try Traceye!
Now that your SubQuery project is created and is ready for launch, it’s time to fast-forward the process with Traceye.
Traceye offers two different ways to launch your SubQuery indexing project. First is the option to set up a dedicated node and another is to deploy using the hosted service option on a shared infrastructure. We’ll discuss both this process.
Option:1 Setup your dedicated SubQuery node
Launching a dedicated SubQuery indexing node on Traceye allows you to set up multiple subquery projects on top of the node. This essentially provides a dedicated infrastructure that can power a range of subgraphs to fetch custom data. Here’s how to setup the node:
Login to Traceye if you’re a returning user or create your account first. Navigate to ‘SubQuery node’ from the left-side panel and proceed with ‘Buy Subscription’ to complete the checkout process. Select node quantity, etc
Start setting up your SubQuery node immediately after successful subscription. Select node name (MySubQueryNode in our case) and verify the machine configuration details.
Enable add-on in the next step, if you have opted for it. Like, we’ve enabled Traceye BI tool access. Using BI analytics tools, you can transform complex or raw on-chain data into actionable visual insights. Want an end-to-end process for this? Here’s the guide:
Click ‘Next’ to deploy the node. Once node is properly synched and its server is live, it will appear like this on the dashboard:
On top of this dedicated SubQuery node, you can deploy multiple Subquery indexing projects customized to your requirements. As you can see in the above image, we’ve launched ‘curve’ and ‘avaxx’ on top of our node ‘MySubqueryNode’. To do that, click on ‘Add Subquery’ from the top-right of the dashboard,
The process to launch Subquery indexer project will remain the same as the hosted SubQuery– discussed in option-2.
Option:2 Deploy using Hosted Subquery
Hosted SubQuery is Traceye’s cost-efficient option for launching your SubQuery indexing project. This offering works similar to the dedicated node option where a single node provides infra to multiple projects. As visible in the below screenshot, you can launch a standard Subquery project at just $69. Now, let’s see the process:
Visit Traceye dashboard. From the left-side panel, navigate to Hosted Subquery—>Buy Subscription and complete the checkout process.
Upon successful payment, you will be redirected to create your Subquery indexing project. Start by adding a suitable name, do network family selection, and pick your blockchain network. Click ‘add subgraph’ to launch it. For example, we’ve launched the ‘user-engagement-metrics’ SubQuery project.
Once your SubQuery indexer is launched and synched properly, it will appear on the dashboard like this:
Clicking on this indexer will redirect to a Subquery details page, which shows project name, sync status, number of requests made, API, consumed, Query URL, and most importantly– the deployment command.
Next, install TraceEye CLI using npm install -g @traceeye/cli . Use deployment command to finish the Subquery deployment.
Once done, the Query URL will be active on your Subquery project. This gives you access to GraphQL playground from where you can perform custom requests and query data. Let’s test it.
Open GraphQL playground.
Add the syntax, for example::
This syntax will fetch data related to transfers. Basically, it will retrieve the ID from each transfer happening through nodes. Hit the play button to fetch the data.
Monitoring & maintenance of your Subquery project:
Traceye’s offerings are not limited to 10-minutes quick launch. It ensures your SubQuery indexing project or SubQuery node remains up and running with zero downtime and other performance issues.
For hosted Subquery:
Go to your project details page and head to logs. These logs are created on multiple parameters, including Info, Debug, Warning, and Error.
For Subquery node:
Go to Subquery node details page—> click the three dots menu. Under analytics & monitoring section, there’s ‘system metrics’ and ‘alerts’.
The system metrics will show data about CPU performance, disk space utilization, memory usage, etc.
Alerts are real-time updates about the Subquery node performance. Like this:
However, Traceye ensures to solve all the alerts automatically, maintaining performance and resiliency for the node.
Get started with your SubQuery indexing project!
SubQuery is rapidly emerging as a leader in decentralized indexing offers a full suite of indexing solutions – decentralized indexers and RPCs to cutting-edge AI applications. With such a growing global interest, now is the perfect time to integrate SubQuery into your project.
If you’re planning to launch a SubQuery indexer node or leverage the hosted service, Traceye offers a full-suite solution tailored to your needs. Our experts are ready to discuss customizations and help you maximize your indexing capabilities.