{"id":18665275,"url":"https://github.com/avaprotocol/oak-subql","last_synced_at":"2025-10-29T18:07:45.223Z","repository":{"id":39848139,"uuid":"460630312","full_name":"AvaProtocol/oak-subql","owner":"AvaProtocol","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-30T21:02:08.000Z","size":703,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"staging","last_synced_at":"2024-12-27T17:32:27.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvaProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-17T22:34:00.000Z","updated_at":"2022-04-07T00:30:15.000Z","dependencies_parsed_at":"2024-06-12T18:58:14.628Z","dependency_job_id":"c9431e8f-4b42-47e4-a5e2-ffe5fd32324c","html_url":"https://github.com/AvaProtocol/oak-subql","commit_stats":null,"previous_names":["avaprotocol/oak-subql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Foak-subql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Foak-subql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Foak-subql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Foak-subql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvaProtocol","download_url":"https://codeload.github.com/AvaProtocol/oak-subql/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239492274,"owners_count":19647990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T08:27:00.128Z","updated_at":"2025-10-19T11:59:03.434Z","avatar_url":"https://github.com/AvaProtocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neumann Network \u0026 Subquery \n\nA SubQuery package defines which data The SubQuery will index from the Substrate blockchain, and how it will store it. \n\nYou can find the another Neumann dictionary in [this link](https://explorer.subquery.network/subquery/subquery/neumann-dictionary)\n\n## Preparation\n\n#### Environment\n\n- [Typescript](https://www.typescriptlang.org/) are required to compile project and define types.  \n\n- Both SubQuery CLI and generated Project have dependencies and require [Node](https://nodejs.org/en/).\n     \n\n#### Install the SubQuery CLI\n\nInstall SubQuery CLI globally on your terminal by using NPM:\n\n```\nnpm install -g @subql/cli\n```\n\nRun help to see available commands and usage provide by CLI\n```\nsubql help\n```\n\n## Install package deps\n```\n    yarn install\n```\n\n## Configure your project\n\nIn the starter package, we have provided a simple example of project configuration. You will be mainly working on the following files:\n\n- The Manifest in `project.yaml`\n- The GraphQL Schema in `schema.graphql`\n- The Mapping functions in `src/mappings/` directory\n\nFor more information on how to write the SubQuery, \ncheck out our doc section on [Define the SubQuery](https://doc.subquery.network/define_a_subquery.html) \n\n#### Code generation\n\nIn order to index your SubQuery project, it is mandatory to build your project first.\nRun this command under the project directory.\n\n````\nyarn codegen\n````\n\n## Build the project\n\nIn order to deploy your SubQuery project to our hosted service, it is mandatory to pack your configuration before upload.\nRun pack command from root directory of your project will automatically generate a `your-project-name.tgz` file.\n\n```\nyarn build\n```\n\n## Indexing and Query\n\n#### Run required systems in docker\n\nMake sure your docker is running first.\n\nUnder the project directory run following command:\n\n```\ndocker-compose pull \u0026\u0026 docker-compose up\n```\n#### Query the project\n\nOpen your browser and head to `http://localhost:3000`.\n\nFinally, you should see a GraphQL playground is showing in the explorer and the schemas that ready to query.\n\n#### Example: Account Snapshots\n\n````graphql\nquery {\n    accountSnapshots (first: 5) {\n        nodes {\n            id\n            accountId\n            snapshotAtBlock\n            freeBalance\n        }\n    }\n    accounts (first: 5) {\n        nodes {\n            id\n            freeBalance\n            reserveBalance\n            totalBalance\n        }\n    }\n}\n````\n#### Example: Automation task list\n\n```graphql\nquery {\n  extrinsics(filter: { \n    timestamp: { greaterThanOrEqualTo: \u003cstart_timestamp\u003e, lessThanOrEqualTo: \u003cend_timestamp\u003e },\n    method: { in: [\"scheduleNotifyTask\", \"scheduleNativeTaskTransfer\"] },\n    success: { equalTo: true }\n  }) {\n    nodes {\n      timestamp blockHeight method args\n    }\n  }\n}\n```\n\n#### Example: Automation execution\n\n```graphql\nquery {\n  events(filter: { \n    timestamp: { greaterThanOrEqualTo: \u003cstart_timestamp\u003e, lessThanOrEqualTo: \u003cend_timestamp\u003e },\n    method: { in: [\"Notify\", \"SuccesfullyTransferredFunds\"] }\n  }) {\n    nodes {\n      timestamp blockHeight method data\n    }\n  }\n}\n```\n\n# Local development","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaprotocol%2Foak-subql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaprotocol%2Foak-subql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaprotocol%2Foak-subql/lists"}