https://github.com/wpank/subql
https://github.com/wpank/subql
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/wpank/subql
- Owner: wpank
- License: mit
- Created: 2022-07-15T23:26:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-17T09:41:23.000Z (almost 4 years ago)
- Last Synced: 2023-03-02T03:21:21.242Z (over 3 years ago)
- Language: TypeScript
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Preparation
#### Environment
- [Typescript](https://www.typescriptlang.org/) are required to compile project and define types.
- Both SubQuery CLI and generated Project have dependencies and require [Node](https://nodejs.org/en/).
#### Code generation
In order to index your SubQuery project, it is mandatory to build your project first.
Run this command under the project directory.
````
yarn codegen
````
## Build the project
In order to deploy your SubQuery project to our hosted service, it is mandatory to pack your configuration before upload.
Run pack command from root directory of your project will automatically generate a `your-project-name.tgz` file.
```
yarn build
```
## Indexing and Query
#### Run required systems in docker
Under the project directory run following command:
```
docker-compose pull && docker-compose up
```
#### Query the project
Open your browser and head to `http://localhost:3000`.
Finally, you should see a GraphQL playground is showing in the explorer and the schemas that ready to query.
For the `subql-starter` project, you can try to query with the following code to get a taste of how it works.
````graphql
{
query{
starterEntities(first:10){
nodes{
field1,
field2,
field3
}
}
}
}
````