cli for polkagraph
$ npm install -g @subql/cli
$ subql COMMAND
running command...
$ subql (-v|--version|version)
@subql/cli/1.12.4-1 linux-x64 node-v16.19.1
$ subql --help [COMMAND]
USAGE
$ subql COMMAND
...
subql build
subql codegen
subql deployment
subql deployment:delete
subql deployment:deploy
subql deployment:promote
subql help [COMMAND]
subql init [PROJECTNAME]
subql migrate
subql project
subql project:create-project
subql project:delete-project
subql publish
subql validate
Build this SubQuery project code
USAGE
$ subql build
OPTIONS
-f, --location=location local folder
-o, --output=output output folder of build e.g. dist
-s, --slient silent mode
--mode=(production|prod|development|dev) [default: production]
See code: lib/commands/build.js
Generate schemas for graph node
USAGE
$ subql codegen
OPTIONS
-f, --file=file specify manifest file path (will overwrite -l if both used)
-l, --location=location [deprecated] local folder to run codegen in. please use file flag instead
See code: lib/commands/codegen.js
Deploy to hosted service
USAGE
$ subql deployment
OPTIONS
-d, --useDefaults Use default values for indexerVersion, queryVersion, dictionary, endpoint
--deploymentID=deploymentID Enter deployment ID
--dict=dict Enter dictionary
--disableHistorical Disable Historical Data
--endpoint=endpoint Enter endpoint
--indexerBatchSize=indexerBatchSize Enter batchSize from 1 to 30
--indexerSubscription Enable Indexer subscription
--indexerUnsafe Enable indexer unsafe
--indexerVersion=indexerVersion Enter indexer-version
--indexerWorkers=indexerWorkers Enter worker threads from 1 to 30
--ipfsCID=ipfsCID Enter IPFS CID
--options=deploy|promote|delete
--org=org Enter organization name
--projectName=projectName Enter project name
--project_name=project_name Enter project name
--queryAggregate Enable Aggregate
--queryMaxConnection=queryMaxConnection Enter MaxConnection from 1 to 10
--querySubscription Enable Query subscription
--queryTimeout=queryTimeout Enter timeout from 1000ms to 60000ms
--queryUnsafe Enable indexer unsafe
--queryVersion=queryVersion Enter query-version
--type=(stage|primary) [default: primary]
See code: lib/commands/deployment/index.js
Delete Deployment
USAGE
$ subql deployment:delete
OPTIONS
--deploymentID=deploymentID Enter deployment ID
--org=org Enter organization name
--project_name=project_name Enter project name
See code: lib/commands/deployment/delete.js
Deployment to hosted service
USAGE
$ subql deployment:deploy
OPTIONS
-d, --useDefaults Use default values for indexerVersion, queryVersion, dictionary, endpoint
--dict=dict Enter dictionary
--disableHistorical Disable Historical Data
--endpoint=endpoint Enter endpoint
--indexerBatchSize=indexerBatchSize Enter batchSize from 1 to 30
--indexerSubscription Enable Indexer subscription
--indexerUnsafe Enable indexer unsafe
--indexerVersion=indexerVersion Enter indexer-version
--indexerWorkers=indexerWorkers Enter worker threads from 1 to 30
--ipfsCID=ipfsCID Enter IPFS CID
--org=org Enter organization name
--projectName=projectName Enter project name
--queryAggregate Enable Aggregate
--queryMaxConnection=queryMaxConnection Enter MaxConnection from 1 to 10
--querySubscription Enable Query subscription
--queryTimeout=queryTimeout Enter timeout from 1000ms to 60000ms
--queryUnsafe Enable indexer unsafe
--queryVersion=queryVersion Enter query-version
--type=(stage|primary) [default: primary]
See code: lib/commands/deployment/deploy.js
Promote Deployment
USAGE
$ subql deployment:promote
OPTIONS
--deploymentID=deploymentID Enter deployment ID
--org=org Enter organization name
--project_name=project_name Enter project name
See code: lib/commands/deployment/promote.js
display help for subql
USAGE
$ subql help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Initialize a scaffold subquery project
USAGE
$ subql init [PROJECTNAME]
ARGUMENTS
PROJECTNAME Give the starter project name
OPTIONS
-f, --force
-l, --location=location local folder to create the project in
--install-dependencies Install dependencies as well
--npm Force using NPM instead of yarn, only works with `install-dependencies` flag
See code: lib/commands/init.js
Migrate Subquery project manifest to v1.0.0
USAGE
$ subql migrate
OPTIONS
-f, --force
-l, --location=location local folder to run migrate in
--file=file
See code: lib/commands/migrate.js
Create/Delete project
USAGE
$ subql project
OPTIONS
--apiVersion=apiVersion [default: 2] Enter api version
--dedicatedDB=dedicatedDB Enter dedicated DataBase
--description=description Enter description
--gitRepo=gitRepo Enter git repository
--logoURL=logoURL Enter logo URL
--options=create|delete
--org=org Enter organization name
--projectName=projectName Enter project name
--subtitle=subtitle Enter subtitle
See code: lib/commands/project/index.js
Create Project on Hosted Service
USAGE
$ subql project:create-project
OPTIONS
--apiVersion=apiVersion [default: 2] Enter api version
--dedicatedDB=dedicatedDB Enter dedicated DataBase
--description=description Enter description
--gitRepo=gitRepo Enter git repository
--logoURL=logoURL Enter logo URL
--org=org Enter organization name
--projectName=projectName Enter project name
--subtitle=subtitle Enter subtitle
See code: lib/commands/project/create-project.js
Delete Project on Hosted Service
USAGE
$ subql project:delete-project
OPTIONS
--org=org Enter organization name
--projectName=projectName Enter project name
See code: lib/commands/project/delete-project.js
Upload this SubQuery project to IPFS
USAGE
$ subql publish
OPTIONS
-f, --location=location from project or manifest path
-o, --output Output IPFS CID
--ipfs=ipfs IPFS gateway endpoint
See code: lib/commands/publish.js
Check a folder or github repo is a validate subquery project
USAGE
$ subql validate
OPTIONS
-l, --location=location local folder, github repo url or
IPFS cid
--ipfs=ipfs [default: https://unauthipfs.subquer
y.network/ipfs/api/v0] IPFS gateway
endpoint, used for validating
projects on IPFS
--network-family=(Substrate|Avalanche|Terra|Cosmos|Algorand|Ethereum|Flare|Near)
--silent
See code: lib/commands/validate.js