-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
# SubQl | ||
![open grant logo](https://raw.githubusercontent.com/w3f/General-Grants-Program/master/src/badge_black.svg) | ||
# Subquery | ||
Almost every substrate project has a need to process and query data. | ||
SubQuery is a open-source tool to provide a complete solution to this problem and will become core infrastructure for the Polkadot ecosystem. | ||
We expect it to solve how to Extract, Transform, Persist, and Query data intially, and then how to Connect and Present data in the future. | ||
|
||
SubQuery is NOT an ETL tool, the persisted data is minimized and shaped from the perspective of how it will be used. | ||
|
||
SubQuery aims to support all substrate-compatible networks. | ||
|
||
## Get Started | ||
### Step #1: Create a SubQuery project | ||
1. use `@subql/cli` tool we provide to create a SubQuery project | ||
* it is written in typescript | ||
* user needs to config the project, define a schema and implement mapping functions | ||
2. use `@subql/cli` to generate types from the given schema | ||
3. use `@subql/cli` to compile and pack the SubQuery project | ||
|
||
### Step #2: Run an indexer | ||
Prerequisites | ||
* A Postgres database | ||
* Non-archive full node. If storage query is used, then an archive node is required to extract chain data. [OnFinality](https://onfinality.io/api_service) provides an archive node with a generous free tier that should be more than able to cover most cases. | ||
* A moderately powerful computer to run an indexer in the background | ||
Then start our `@subql/node` with the path of local SubQuery project as arguments, `@subql/node` will handle the rest. | ||
|
||
### Step #3: Run a Query Service | ||
We do have plan for a custom built graphql query service `@subql/query`, but in this stage we will use [Harura](https://hasura.io) to do the job. | ||
|
||
|
||
## Components | ||
Npmjs Packages to published: | ||
* `@subql/cli` | ||
* `@subql/node` | ||
* `@subql/common` | ||
* `@subql/types` | ||
|
||
## More Docs | ||
[Docs](https://onfinality-io.github.io/subql/) | ||
|
||
## Copyright | ||
|
||
Copyright © 2020-2021 OnFinality Limited authors & contributors |