1. Project Overview & Quickstart (subquery/subql)
File: README.md
Welcome to SubQuery!
Flexible, reliable, and decentralised APIs for your web3 project
SubQuery is an Open, Flexible, Fast and Universal data indexing framework for web3. Our mission is to help developers create the decentralised products of the future.
SubQuery allows teams across multiple blockchain architectures to process and query their data. The project is inspired by the growth of data protocols serving the application layer and its aim is to help web3 projects build better dApps by allowing anyone to reliably find and consume data faster. Today, anyone can query and extract blockchain data from various supported networks in only minutes and at no cost.
The future is multi-chain - SubQuery is no different. SubQuery is well on our way to support all leading blockchain networks with support for the following:
- Polkadot (and all Substrate networks)
- Ethereum (and all EVM-compatible networks)
- Cosmos (and all CosmWasm and Ethermint networks)
- Algorand
- NEAR
- Stellar (including Soroban)
- Solana (Beta)
- Starknet
- Concordium
You can also use SubQuery to index data from multiple networks in any combination of the above SDKs. See our Multi-Chain Indexing Quickstart for more details.
Get Started
Create a SubQuery project
You can follow our Quick Start Guide to learn how to create, initialize, build, and publish a new SubQuery Project using the @subql/cli tool.
Learn and improve with our comprehensive documentation
Dig into every term, usecases, and best-practices that help you build a dApp which your users love. Take a look at our detailed technical documentation.
Publish your SubQuery Project to the SubQuery Network
Take advantage of the decentralized SubQuery Network to host your project without managing any infrastructure. By publishing to the SubQuery Network, you'll benefit from a reliable, scalable, cost-optimised, and censorship-resistant indexing service. Follow our comprehensive publishing guide to learn how to upload your project to the network and start leveraging its distributed infrastructure today.
Publish to managed hosting providers
If you prefer a managed hosting option for your indexer deployment, contact our managed hosting partners.
Learn more.
Run your own Indexer and Query Service
Follow our guide to run your own SubQuery local node that you can use to debug, test, and run you own GraphQL server.
You're going to need to a Postgres database, a node to extract chain data, and a moderately powerful computer to run the indexer in the background.
You'll also use our custom-built GraphQL query service @subql/query to interact with your SubQuery project.
MCP (Beta)
You can also create, build and deploy SubQuery projects using MCP (Model Context Protocol). Our MCP integration provides all the same functionality as the CLI but works well with LLMs and AI IDEs such as Cursor.
Manual configuration
For adding SubQuery MCP into other tools, the following command needs be run by the client.
npx -y @subql/cli mcpAn example manual configuration:
"subquery": {
"command": "npx",
"args": ["-y", "@subql/cli", "mcp"]
}Components
This repository contains all the core components of the SubQuery SDK as well as the Substrate implementation. It includes the following packages:
@subql/cli- The command line interface for SubQuery, used to create, build, and publish SubQuery projects@subql/node- The Substrate SubQuery SDK, which provides the indexing functionality for Substrate-based chains@subql/node-core- Core indexing functionality that is chain agnostic@subql/query- The GraphQL query service for SubQuery projects, allowing you to interact with your indexed data.@subql/common- Common utilities and types used across SubQuery packages@subql/common-substrate- Common utilities and types specifically for Substrate-based chains@subql/types- Type definitions for Substrate-based chains and SubQuery projects, including the project manifest and data models
For more detail on the specific network implementations please see their respective repositories:
@subql/node-ethereum@subql/node-cosmos@subql/node-algorand@subql/node-near@subql/node-stellar@subql/node-solana@subql/node-starknet@subql/node-concordium
Other Components:
@subql/query-subgraph- A Subgraph compatible query service for SubQuery projects.
Support
We have a vibrant community of developers and users who are always ready to help. If you have any questions, issues, or need assistance, please reach out to us through the following channels:
Contribute
We love contributions and feedback from the community. To contribute the code, we suggest starting by creating an issue in our main repository so we can give you support.
Copyright
SubQuery is a project built with love from the team at SubQuery all the way from New Zealand
Copyright ยฉ 2025 SubQuery Pte Ltd authors & contributors
File: deploy/k8s/README.md
K8s Deploy
This deploy.yaml demonstrates how to run SubQuery in k8s.
You will need to run
1. a subql-node to index data
apiVersion: apps/v1
kind: Deployment
metadata:
name: subql-node-1
labels:
app: subql-node
release: subql-node-1
spec:
selector:
matchLabels:
release: subql-node-1
replicas: 1
template:
metadata:
labels:
release: subql-node-1
spec:
volumes:
- name: project-dir
emptyDir:
medium: Memory
initContainers:
- name: prepare
imagePullPolicy: IfNotPresent
image: node:lts-alpine
command:
- sh
- -c
- apk add git && git clone https://github.com/OnFinality-io/subql-examples /subquery && cd /subquery/block-timestamp && npm i @subql/cli && yarn && subql codegen && yarn build
volumeMounts:
- name: project-dir
mountPath: '/subquery'
containers:
- name: indexer
imagePullPolicy: IfNotPresent
image: onfinality/subql-node:v0.4.0
args:
- -f
- /subquery/block-timestamp
- --local
env:
- name: DB_HOST
value: subquery-db-svc
- name: DB_PORT
value: "5432"
- name: DB_USER
value: postgres
- name: DB_PASS
value: postgres
- name: DB_DATABASE
value: postgres
volumeMounts:
- name: project-dir
mountPath: '/subquery'
securityContext:
runAsUser: 1000
securityContext:
fsGroup: 1000
imagePullSecrets:
- name: regcredNote: --local will create subquery tables in public schema, if you want to store multiple subquery in the same db, remove that flag.
2. a Postgres Database
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: subquery-db
labels:
app: postgres
release: subquery-db
spec:
serviceName: subquery-db-svc
selector:
matchLabels:
release: subquery-db
volumeClaimTemplates:
- metadata:
name: subquery-db-pvc
annotations:
volume.beta.kubernetes.io/storage-class: standard
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20G
template:
metadata:
labels:
release: subquery-db
spec:
containers:
- name: db
imagePullPolicy: IfNotPresent
image: postgres:12-alpine
env:
- name: POSTGRES_PASSWORD
value: postgres
ports:
- containerPort: 5432
volumeMounts:
- mountPath: /var/lib/postgresql
name: subquery-db-pvc
securityContext:
fsGroup: 1000
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: subquery-db-svc
spec:
clusterIP: None
ports:
- port: 5432
selector:
release: subquery-dbNote that if used in production, a dedicated database should be used to get better performance.
3. Hasura for graphql querying
apiVersion: apps/v1
kind: Deployment
metadata:
name: hasura-deploy
labels:
release: hasura
spec:
selector:
matchLabels:
release: hasura
replicas: 1
template:
metadata:
labels:
release: hasura
spec:
containers:
- name: hasura
image: hasura/graphql-engine:v1.3.3
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
env:
# HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
# ## enable the console served by server
# HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
# ## enable debugging mode. It is recommended to disable this in production
# HASURA_GRAPHQL_DEV_MODE: "true"
# HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
- name: HASURA_GRAPHQL_DATABASE_URL
value: postgres://postgres:postgres@subquery-db-svc:5432/postgres
- name: HASURA_GRAPHQL_ENABLE_CONSOLE
value: 'true'
terminationGracePeriodSeconds: 300To gain further security, an archive node should be used in the same k8s cluster, and a NetworkPolicy be added to limit all network communication within the internal network.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: subquery-node-egress
spec:
podSelector:
matchLabels:
release: subql-node-1
egress:
- to:
- ipBlock:
cidr: 10.0.0.0/8
policyTypes:
- EgressFile: packages/query/README.md
@subql/query
Run this package
To quickly setup the project, add a .env file in the subql/packages/query folder with the following content:
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASS=postgres
DB_DATABASE=postgresthen run the following command
NODE_OPTIONS="-r dotenv/config" yarn start:dev -- --name <subquery_name> --playgroundFile: packages/node/README.md
@subql-node
Description
Indexer service in our @subql toolkit, can load user's subquery then fetch, process and persist to db accordingly.
Installation
$ npm i @subql/nodeRunning the app
/* Detailed source-code truncated for AI context efficiency. */License
Apache-2.0
File: packages/cli/README.md
@subql/cli
CLI for SubQuery
Usage
$ npm install @subql/cli
$ subql COMMAND
running command...
$ subql (--version)
@subql/cli/6.6.3-0 linux-x64 node-v24.11.1
$ subql --help [COMMAND]
USAGE
$ subql COMMAND
...Commands
subql build [LOCATION]subql build-manifest [LOCATION]subql codegen [LOCATION]subql codegen:import-abi LOCATIONsubql import-abi LOCATIONsubql init NAMEsubql mcpsubql migratesubql multi-chain:add [LOCATION]subql network:add-deployment-boostsubql network:connect-walletsubql network:create-api-key NAMEsubql network:create-deploymentsubql network:create-flex-plansubql network:create-projectsubql network:disconnect-walletsubql network:list-account-boostssubql network:list-api-keyssubql network:list-deployment-boostssubql network:list-deployment-indexerssubql network:list-deploymentssubql network:list-flex-planssubql network:list-projectssubql network:remove-api-key NAMEsubql network:remove-deployment-boostsubql network:stop-flex-plansubql network:swap-deployment-boostsubql onfinality:create-deploymentsubql onfinality:create-multichain-deployment [LOCATION]subql onfinality:create-projectsubql onfinality:delete-deploymentsubql onfinality:delete-projectsubql onfinality:promote-deploymentsubql publish [LOCATION]
`subql build [LOCATION]`
Build this SubQuery project code into a bundle
USAGE
$ subql build [LOCATION] [--output <value>]
ARGUMENTS
LOCATION The path to the project, this can be a directory or a project manifest file.
FLAGS
--output=<value> [default: dist] The output location relative to the location
DESCRIPTION
Build this SubQuery project code into a bundleSee code: src/commands/build.ts
`subql build-manifest [LOCATION]`
Build TypeScript manifest file to YAML (generates project.yaml from project.ts)
USAGE
$ subql build-manifest [LOCATION]
ARGUMENTS
LOCATION The path to the project, this can be a directory or a project manifest file.
DESCRIPTION
Build TypeScript manifest file to YAML (generates project.yaml from project.ts)See code: src/commands/build-manifest.ts
`subql codegen [LOCATION]`
Generate entity types from the GraphQL schema and contract interfaces
USAGE
$ subql codegen [LOCATION]
ARGUMENTS
LOCATION The project directory or path to project manifest.
DESCRIPTION
Generate entity types from the GraphQL schema and contract interfacesSee code: src/commands/codegen/index.ts
`subql codegen:import-abi LOCATION`
Import and ABI to generate project handlers and mapping functions based on an Ethereum ABI. If address is provided, it will attempt to fetch the ABI and start block from the Etherscan.
USAGE
$ subql codegen:import-abi LOCATION [--address <value>] [--abiName <value>] [--startBlock <value>] [--abiPath <value>]
[--events <value>] [--functions <value>]
ARGUMENTS
LOCATION The path to the project, this can be a directory or a project manifest file.
FLAGS
--abiName=<value> The contracts name, if not provided, the contract address will be used if the ABI is fetched
from Etherscan
--abiPath=<value> The path to the ABI file
--address=<value> The contracts address
--events=<value> ABI events to generate handlers for. Use '*' for all. e.g. --events="approval, transfer"
--functions=<value> ABI functions to generate handlers for. Use '*' for all. e.g. --functions="approval, transfer"
--startBlock=<value> The start block of the handler, generally the block the contract is deployed.
DESCRIPTION
Import and ABI to generate project handlers and mapping functions based on an Ethereum ABI. If address is provided, it
will attempt to fetch the ABI and start block from the Etherscan.
ALIASES
$ subql import-abiSee code: src/commands/codegen/import-abi.ts
`subql import-abi LOCATION`
Import and ABI to generate project handlers and mapping functions based on an Ethereum ABI. If address is provided, it will attempt to fetch the ABI and start block from the Etherscan.
USAGE
$ subql import-abi LOCATION [--address <value>] [--abiName <value>] [--startBlock <value>] [--abiPath <value>]
[--events <value>] [--functions <value>]
ARGUMENTS
LOCATION The path to the project, this can be a directory or a project manifest file.
FLAGS
--abiName=<value> The contracts name, if not provided, the contract address will be used if the ABI is fetched
from Etherscan
--abiPath=<value> The path to the ABI file
--address=<value> The contracts address
--events=<value> ABI events to generate handlers for. Use '*' for all. e.g. --events="approval, transfer"
--functions=<value> ABI functions to generate handlers for. Use '*' for all. e.g. --functions="approval, transfer"
--startBlock=<value> The start block of the handler, generally the block the contract is deployed.
DESCRIPTION
Import and ABI to generate project handlers and mapping functions based on an Ethereum ABI. If address is provided, it
will attempt to fetch the ABI and start block from the Etherscan.
ALIASES
$ subql import-abi`subql init NAME`
Initialize a SubQuery project from a template
USAGE
$ subql init NAME [--location <value>] [--network <value>] [--networkFamily <value>] [--endpoint
<value>] [--installDependencies] [--packageManager npm|yarn|pnpm] [--author <value>]
ARGUMENTS
NAME The name of the project to create
FLAGS
--author=<value> The project author that will be set in package.json. Defaults to the current system user
--endpoint=<value> The RPC endpoint that the project will use
--installDependencies Install the dependencies of the project
--location=<value> The path to the project, this can be a directory or a project manifest file.
--network=<value> The name of the network the project will index data for
--networkFamily=<value> The network family the project will index data for, e.g. EVM, Substrate
--packageManager=<option> [default: npm]
<options: npm|yarn|pnpm>
DESCRIPTION
Initialize a SubQuery project from a templateSee code: src/commands/init.ts
`subql mcp`
Runs an MCP (Model Context Protocol) server over stdio
USAGE
$ subql mcp
DESCRIPTION
Runs an MCP (Model Context Protocol) server over stdioSee code: src/commands/mcp.ts
`subql migrate`
Migrate a Subgraph project to a SubQuery project, including the manifest and schema.
USAGE
$ subql migrate --input <value> --output <value> [--gitSubDirectory <value>]
FLAGS
--gitSubDirectory=<value> A subdirectory in the git repo if the input is a git repo
--input=<value> (required) A directory or git repo to a subgraph project
--output=<value> (required) The location of the SubQuery project
DESCRIPTION
Migrate a Subgraph project to a SubQuery project, including the manifest and schema.See code: src/commands/migrate.ts
`subql multi-chain:add [LOCATION]`
Add new chain manifest to multi-chain project
USAGE
$ subql multi-chain:add [LOCATION] --chainManifestFile <value>
ARGUMENTS
LOCATION The path to the multichain project, this can be a directory or a multichain manifest file.
FLAGS
--chainManifestFile=<value> (required) The path to the new chain manifest
DESCRIPTION
Add new chain manifest to multi-chain projectSee code: src/commands/multi-chain/add.ts
`subql network:add-deployment-boost`
Increase the boost for a deployment
USAGE
$ subql network:add-deployment-boost --network mainnet|testnet-mumbai|testnet|local --deploymentId <value> --amount
<value>
FLAGS
--amount=<value> (required) The amount to boost the deployment with, in SQT
--deploymentId=<value> (required) The deployment id for the project
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Increase the boost for a deploymentSee code: src/commands/network/add-deployment-boost.ts
`subql network:connect-wallet`
Connect a wallet via Wallet Connect for interacting with the network
USAGE
$ subql network:connect-wallet
DESCRIPTION
Connect a wallet via Wallet Connect for interacting with the networkSee code: src/commands/network/connect-wallet.ts
`subql network:create-api-key NAME`
Create an API key for making queries via the SubQuery Network
USAGE
$ subql network:create-api-key NAME --network mainnet|testnet-mumbai|testnet|local
ARGUMENTS
NAME The name of the api key, used to identify it
FLAGS
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Create an API key for making queries via the SubQuery NetworkSee code: src/commands/network/create-api-key.ts
`subql network:create-deployment`
Create a new deployment for a SubQuery project
USAGE
$ subql network:create-deployment --network mainnet|testnet-mumbai|testnet|local --projectId <value> --deploymentId <value>
--deploymentVersion <value> [--deploymentDescription <value>]
FLAGS
--deploymentDescription=<value> A description of the deployment, release notes
--deploymentId=<value> (required) The IPFS CID of the published project
--deploymentVersion=<value> (required) The version of the deployment
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
--projectId=<value> (required) The project id, this should be a 0x prefixed hex number
DESCRIPTION
Create a new deployment for a SubQuery projectSee code: src/commands/network/create-deployment.ts
`subql network:create-flex-plan`
Create a new Flex Plan for querying a SubQuery deployment on the SubQuery Network
USAGE
$ subql network:create-flex-plan --network mainnet|testnet-mumbai|testnet|local --deploymentId <value> --amount
<value>
FLAGS
--amount=<value> (required) The amount to deposit into the plan, in SQT
--deploymentId=<value> (required) The deploymentId to create a flex plan for
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Create a new Flex Plan for querying a SubQuery deployment on the SubQuery NetworkSee code: src/commands/network/create-flex-plan.ts
`subql network:create-project`
Create a new SubQuery project on the SubQuery network
USAGE
$ subql network:create-project --network mainnet|testnet-mumbai|testnet|local --deploymentId <value> --projectType
0|1|2|3|SUBQUERY|RPC|SQ_DICT|SUBGRAPH --name <value> [--description <value>] [--image <value>] [--tags <value>...]
[--website <value>] [--codeRepository <value>] [--deploymentVersion <value>] [--deploymentDescription <value>]
FLAGS
--codeRepository=<value> A URL to the project code repository
--deploymentDescription=<value> A description of the deployment, release notes
--deploymentId=<value> (required) The IPFS CID of the published project
--deploymentVersion=<value> [default: 1.0.0] The version of the deployment
--description=<value> A short description of the project
--image=<value> A URL to an image for the project
--name=<value> (required) The name of the project
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
--projectType=<option> (required)
<options: 0|1|2|3|SUBQUERY|RPC|SQ_DICT|SUBGRAPH>
--tags=<value>... A list of tags for the project
--website=<value> A URL to the project website
DESCRIPTION
Create a new SubQuery project on the SubQuery networkSee code: src/commands/network/create-project.ts
`subql network:disconnect-wallet`
Disconnect a wallet connected via WalletConnect
USAGE
$ subql network:disconnect-wallet
DESCRIPTION
Disconnect a wallet connected via WalletConnectSee code: src/commands/network/disconnect-wallet.ts
`subql network:list-account-boosts`
Get a list of the deployments an account boosts
USAGE
$ subql network:list-account-boosts --network mainnet|testnet-mumbai|testnet|local [--address <value>]
FLAGS
--address=<value> The account address to list boosts for
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Get a list of the deployments an account boostsSee code: src/commands/network/list-account-boosts.ts
`subql network:list-api-keys`
List API keys for making queries via the SubQuery Network
USAGE
$ subql network:list-api-keys --network mainnet|testnet-mumbai|testnet|local
FLAGS
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
List API keys for making queries via the SubQuery NetworkSee code: src/commands/network/list-api-keys.ts
`subql network:list-deployment-boosts`
Get a list of boosts made to a project deployment
USAGE
$ subql network:list-deployment-boosts --network mainnet|testnet-mumbai|testnet|local --deploymentId <value>
FLAGS
--deploymentId=<value> (required) The deployment id for the project
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Get a list of boosts made to a project deploymentSee code: src/commands/network/list-deployment-boosts.ts
`subql network:list-deployment-indexers`
List the indexers for a deployment on the SubQuery Network
USAGE
$ subql network:list-deployment-indexers --network mainnet|testnet-mumbai|testnet|local --deploymentId <value>
FLAGS
--deploymentId=<value> (required) The DeploymentID of the project to list deployments for
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
List the indexers for a deployment on the SubQuery NetworkSee code: src/commands/network/list-deployment-indexers.ts
`subql network:list-deployments`
List deployments for a SubQuery project
USAGE
$ subql network:list-deployments --network mainnet|testnet-mumbai|testnet|local --projectId <value>
FLAGS
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
--projectId=<value> (required) The ID of the project to list deployments for
DESCRIPTION
List deployments for a SubQuery projectSee code: src/commands/network/list-deployments.ts
`subql network:list-flex-plans`
List your Flex Plans for querying projects on the SubQuery Network
USAGE
$ subql network:list-flex-plans --network mainnet|testnet-mumbai|testnet|local [--address <value>]
FLAGS
--address=<value> The account address to list boosts for
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
List your Flex Plans for querying projects on the SubQuery NetworkSee code: src/commands/network/list-flex-plans.ts
`subql network:list-projects`
List projects for a given account on then SubQuery network
USAGE
$ subql network:list-projects --network mainnet|testnet-mumbai|testnet|local [--address <value>] [--networkRpc
<value>]
FLAGS
--address=<value> The address of the account that owns the projects
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
--networkRpc=<value> Override the network rpc url
DESCRIPTION
List projects for a given account on then SubQuery networkSee code: src/commands/network/list-projects.ts
`subql network:remove-api-key NAME`
Remove an API key used for making queries via the SubQuery Network
USAGE
$ subql network:remove-api-key NAME --network mainnet|testnet-mumbai|testnet|local
ARGUMENTS
NAME The name of the api key, used to identify it
FLAGS
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Remove an API key used for making queries via the SubQuery NetworkSee code: src/commands/network/remove-api-key.ts
`subql network:remove-deployment-boost`
Decrease the boost amount for a project deployment on the SubQuery network
USAGE
$ subql network:remove-deployment-boost --network mainnet|testnet-mumbai|testnet|local --deploymentId <value> --amount
<value>
FLAGS
--amount=<value> (required) The amount of boost to remove from the deployment, in SQT
--deploymentId=<value> (required) The deployment id for the project
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Decrease the boost amount for a project deployment on the SubQuery networkSee code: src/commands/network/remove-deployment-boost.ts
`subql network:stop-flex-plan`
Stop a Flex Plan for a deployment on the SubQuery Network
USAGE
$ subql network:stop-flex-plan --network mainnet|testnet-mumbai|testnet|local --deploymentId <value>
FLAGS
--deploymentId=<value> (required) The deploymentId to create a flex plan for
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
DESCRIPTION
Stop a Flex Plan for a deployment on the SubQuery NetworkSee code: src/commands/network/stop-flex-plan.ts
`subql network:swap-deployment-boost`
Swap the boost from one deployment to another deployment on the SubQuery Network
USAGE
$ subql network:swap-deployment-boost --network mainnet|testnet-mumbai|testnet|local --fromDeploymentId <value> --toDeploymentId
<value> --amount <value>
FLAGS
--amount=<value> (required) The amount to boost the deployment with, in SQT
--fromDeploymentId=<value> (required) The deployment id for the project that is already boosted
--network=<option> (required) [default: mainnet] The network to check.
<options: mainnet|testnet-mumbai|testnet|local>
--toDeploymentId=<value> (required) The deployment id for the project to move the boost to
DESCRIPTION
Swap the boost from one deployment to another deployment on the SubQuery NetworkSee code: src/commands/network/swap-deployment-boost.ts
`subql onfinality:create-deployment`
Create a project deployment on the OnFinality managed services
/* Detailed source-code truncated for AI context efficiency. */See code: src/commands/onfinality/create-deployment.ts
`subql onfinality:create-multichain-deployment [LOCATION]`
Create a multi-chain project deployment no the OnFinality managed services
/* Detailed source-code truncated for AI context efficiency. */See code: src/commands/onfinality/create-multichain-deployment.ts
`subql onfinality:create-project`
Create a project on the OnFinality managed services
USAGE
$ subql onfinality:create-project --org <value> --projectName <value> [--logoURL <value>] [--subtitle <value>] [--description
<value>] [--dedicatedDB <value>] [--projectType subquery|subgraph]
FLAGS
--dedicatedDB=<value> Dedicated DataBase
--description=<value> Description
--logoURL=<value> Logo URL
--org=<value> (required) Github organization name
--projectName=<value> (required) Project name
--projectType=<option> [default: subquery] Project type [subquery|subgraph]
<options: subquery|subgraph>
--subtitle=<value> Subtitle
DESCRIPTION
Create a project on the OnFinality managed servicesSee code: src/commands/onfinality/create-project.ts
`subql onfinality:delete-deployment`
Delete a deployment from the OnFinality managed services
USAGE
$ subql onfinality:delete-deployment --org <value> --projectName <value> --deploymentID <value>
FLAGS
--deploymentID=<value> (required) Deployment ID
--org=<value> (required) Github organization name
--projectName=<value> (required) Project name
DESCRIPTION
Delete a deployment from the OnFinality managed servicesSee code: src/commands/onfinality/delete-deployment.ts
`subql onfinality:delete-project`
Delete a project on the OnFinality managed services
USAGE
$ subql onfinality:delete-project --org <value> --projectName <value>
FLAGS
--org=<value> (required) The Github organization name
--projectName=<value> (required) The project name
DESCRIPTION
Delete a project on the OnFinality managed servicesSee code: src/commands/onfinality/delete-project.ts
`subql onfinality:promote-deployment`
Promote a deployment on the OnFinality managed services from a Stage environment to Production
USAGE
$ subql onfinality:promote-deployment --org <value> --projectName <value> --deploymentID <value>
FLAGS
--deploymentID=<value> (required) Deployment ID
--org=<value> (required) Github organization name
--projectName=<value> (required) Project name
DESCRIPTION
Promote a deployment on the OnFinality managed services from a Stage environment to ProductionSee code: src/commands/onfinality/promote-deployment.ts
`subql publish [LOCATION]`
Upload this SubQuery project to IPFS for distribution
USAGE
$ subql publish [LOCATION] [--ipfs <value>] [--silent]
ARGUMENTS
LOCATION The path to the project, this can be a directory or a project manifest file.
FLAGS
--ipfs=<value> An additional IPFS endpoint to upload to
--silent Run the command without logging, only outputs the CIDs
DESCRIPTION
Upload this SubQuery project to IPFS for distributionSee code: src/commands/publish.ts
2. Official Technical Reference & Guides (subquery/subql-docs)
File: README.md
SubQuery Documentation
SubQuery enables better dApps by making decentralised data more accessible - learn more.
This is the home of SubQuery documentation. All updates to docs should be added here.
We welcome any contributions or improvements from our community, if you're looking for support we suggest starting by going to the technical support channel in SubQuery's official Discord server.
Note you should really use pnpm package manager when editing docs.
Contributing To SubQuery
Welcome and a big thank you for considering contributing to this SubQuery project! Together we can pave the way to a more decentralised future.
This documentation is actively maintained by the SubQuery team. We welcome your contributions, you can do so by forking our GitHub project and making changes to all the documentation markdown files under the
docsdirectory.
You can read more about contribution guidelines here.
About SubQuery
SubQuery is a decentralized data aggregation, indexing & querying layer between Layer-1 blockchains and decentralized applications. This service unlocks blockchain data and transforms it to a queryable state so that it can be used in intuitive applications. It allows DApp developers to focus on their core use case and front-end, without needing to waste time on building a custom backend for data processing. The upcoming SubQuery Network will decentralize and tokenize the ecosystem to allow everyone to participate in the web3 data revolution.
Linktreeย |ย Websiteย | Warpcast | Discordย |ย Telegramย |ย X (formerly Twitter)ย |ย Matrixย |ย LinkedInย |ย YouTube
File: docs/README.md
footer: false sidebar: false lastUpdated: false contributors: false editLink: false photoSwipe: false
<Typography tag="h1" center maxWidth="787">
Learn how to build with SubQuery
</Typography>
<Typography tag="h4" center maxWidth="687" family="body">
SubQuery is a fast, flexible, and reliable open-source data
decentralised infrastructure network, providing both RPC and indexed
data to consumers around the world.
</Typography>
<Typography tag="h4" center maxWidth="687" family="body">
The SubQuery Data Indexer is a open-source data indexer that provides
you with custom APIs for your web3 project across all of our supported
chains.
</Typography>
<Typography tag="h4" center maxWidth="687" family="body">
SubQuery AI Apps framework makes building decentralised AI Applications
fast and easy.
</Typography>
<router-link
class="flexCol gp24"
:to="{ path: '/indexer/welcome.html' }"
>
<Typography tag="h4" family="body">Indexer SDK</Typography>
<Typography tag="h3">Build with SubQuery's Indexer SDK</Typography>
<Typography tag="h5" type="secondary"
>SubQuery is a fast, flexible, and reliable open-source data indexer
that provides you with custom APIs for your web3 project across all
of our supported chains.
</Typography>
Learn more
</router-link>
<router-link
class="flexCol gp24"
:to="{ path: '/ai/welcome.html' }"
>
<Typography tag="h4" family="body">AI Apps Framework</Typography>
<Typography tag="h3">Agentic AI with SubQuery's AI Apps</Typography>
<Typography tag="h5" type="secondary"
>The AI App Framework allows you to build, deploy, and run agentic production AI apps on the SubQuery Network in a trusted and decentralised environment.</Typography>
Learn more
</router-link>
<router-link
class="flexCol gp24"
:to="{ path: '/subquery_network/welcome.html' }"
>
<Typography tag="h4" family="body">SubQuery Network</Typography>
<Typography tag="h3"
>Decentralised Infra on the SubQuery Network</Typography
>
<Typography tag="h5" type="secondary">
Our decentralised infrastructure network revolutionises the web3
landscape, providing both RPC and indexed data to consumers around
the world.</Typography
>
Learn more
</router-link>
<Typography tag="h3"> Our Most Popular Guides </Typography>
<component
class="flexCol gp24"
:is="guide.path.startsWith('https') ? 'a' : 'router-link'"
:href="guide.path.startsWith('https') ? guide.path : ''"
:target="guide.path.startsWith('https') ? '_blank' : ''"
:to="{ path: guide.path }"
>
<Typography tag="p">{{ guide.title }}</Typography>
<Typography size="medium">{{ guide.description }}</Typography>
</component>
<Typography tag="h3"> Start building on different chains </Typography>
<router-link
class="flexColCenter gp16"
:to="{ path: startWith.path }"
>
<Typography size="large" weight="600" center>{{
startWith.name
}}</Typography>
</router-link>