-
Typescript are required to compile project and define types.
-
Both SubQuery CLI and generated Project have dependencies and require Node.
Install SubQuery CLI globally on your terminal by using NPM:
npm install -g @subql/cli
Then you should see a folder with your project name has been created inside the directory, you can use this as the start point of your project. And the files should be identical as in the Directory Structure.
Last, under the project directory, run following command to install all the dependency.
yarn install
In order to index your SubQuery project, it is mandatory to build your project first. Run this command under the project directory.
yarn codegen
yarn build
Under the project directory run following command:
docker-compose pull && docker-compose up
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.