{"id":19369159,"url":"https://github.com/joystream/storage-squid","last_synced_at":"2026-05-12T21:38:29.523Z","repository":{"id":212347923,"uuid":"725509219","full_name":"Joystream/storage-squid","owner":"Joystream","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-15T17:01:13.000Z","size":2208,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-23T13:35:59.413Z","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/Joystream.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-11-30T09:44:49.000Z","updated_at":"2023-11-30T09:46:37.000Z","dependencies_parsed_at":"2024-11-10T08:09:55.993Z","dependency_job_id":"b530e301-902d-4e16-a82d-bb3e1559b0cd","html_url":"https://github.com/Joystream/storage-squid","commit_stats":null,"previous_names":["joystream/storage-squid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joystream%2Fstorage-squid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joystream%2Fstorage-squid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joystream%2Fstorage-squid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joystream%2Fstorage-squid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joystream","download_url":"https://codeload.github.com/Joystream/storage-squid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240491826,"owners_count":19809977,"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-10T08:09:53.928Z","updated_at":"2026-05-12T21:38:29.360Z","avatar_url":"https://github.com/Joystream.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Storage-Squid\n\nThe Joystream Storage-Squid is a [Subsquid](https://docs.subsquid.io/) based project that indexes _Only_ content-directory and storage data from Joystream blockchain and serves it via GraphQL API.\n\n## Project structure\n\n\n* `assets/patches/` - Patched npm packages\n* `db/migrations/` - Postgres database migrations\n* `schema/` - GraphQL schema definitions\n* `src/mappings/` - Runtime events mappings/handlers\n* `src/model/` - TypeORM entity classes/models generated from Graphql schema\n* `src/types/` - Generated TypeScript definitions for Substrate events, calls and storage\n* `src/processor.ts` - Main entry point for the storage squid processor. It also maps the runtime events to respective handlers.\n* `typegen.json` - Typegen configuration file. Used to generate TypeScript definitions for Substrate events\n\n## Prerequisites\n\n* node 16.x\n* docker\n* npm -- note that `yarn` package manager is not supported\n\n\n## Starting the Storage-Squid\n\n```bash\nmake prepare # install dependencies and build the project\nmake up-squid # start the storage-squid processor and the GraphQL server\n```\n\n## Logging \n\nThe storage-squid uses the `@subsquid/logger` package for logging. The logger is configured to log to `stderr` and the log level is determined by the `SQD_*` environment variables. \n\nBy default, the log level for Storage Squid processor is set to `SQD_DEBUG=sqd:processor:mapping`. This means that all loggers will log at `DEBUG` level. So the processor logs will contain `DEBUG`, `INFO`, `WARN`, `ERROR` and `FATAL` logs (The integer values for these logging levels are `1`, `2`, `3`, `4` and `5` respectively).\n\nHowever, sometimes it is very difficult to analyze the processor logs because of the high volume of DEBUG logs. So maybe you only want to see `INFO`, `WARN`, `ERROR` and `FATAL` logs. You can do this by using the `docker logs ...` command in the following way\n\n```bash\n# Only INFO logs\ndocker logs squid_processor 2\u003e\u00261 | grep -E \"\\\"level\\\":2\" \n\n# INFO and above logs\ndocker logs squid_processor -f 2\u003e\u00261 | grep -E \"\\\"level\\\":2|\\\"level\\\":3|\\\"level\\\":4|\\\"level\\\":5\" \n\n# You can also use other docker logs options like --follow, --tail etc\ndocker logs squid_processor --follow --tail 100 2\u003e\u00261 | grep -E \"\\\"level\\\":2|\\\"level\\\":3|\\\"level\\\":4|\\\"level\\\":5\" \n\n# In case you only want to see the logs of a specific logger namespace e.g sqd:processor, you can use the following command.\ndocker logs squid_processor -f 2\u003e\u00261 | grep -E \"\\\"sqd:processor\"\\\" \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoystream%2Fstorage-squid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoystream%2Fstorage-squid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoystream%2Fstorage-squid/lists"}