Giter Site home page Giter Site logo

subql's Introduction

open grant logo

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
  1. use @subql/cli to generate types from the given schema
  2. 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 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 to do the job.

Components

Npmjs Packages to published:

  • @subql/cli
  • @subql/node
  • @subql/common
  • @subql/types

More Docs

Docs

Copyright

Copyright © 2020-2021 OnFinality Limited authors & contributors

subql's People

Contributors

ianhe8x avatar jiqiang90 avatar zhex avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.