- Home
- Skills
- Dojoengine
- Book
- Dojo Indexer
dojo-indexer_skill
- TypeScript
51
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill dojoengine/book --skill dojo-indexer- SKILL.md6.3 KB
Overview
This skill sets up and configures Torii, the Dojo indexer, to expose your world state via GraphQL, gRPC subscriptions, and direct SQL access. It helps you index a deployed world so clients can run efficient queries and receive real-time updates. Use it to speed up reads, implement subscriptions, and run complex analytics against indexed data.
How this skill works
Torii watches the blockchain for world events and indexes model state changes into a local SQLite store. It exposes a GraphQL HTTP endpoint for queries and a gRPC/WebSocket interface for real-time subscriptions. You can also connect directly to the SQLite database for advanced SQL queries and aggregations.
When to use it
- You have a deployed world and need fast, filterable queries for client apps
- You want real-time subscriptions for entity updates or event streams
- You need type-safe, model-specific GraphQL queries for UI development
- You require SQL access for reporting or complex aggregations
- You need a local development indexer that mirrors world state
Best practices
- Start Torii with --world and set --db-dir for production persistence
- Prefer model-specific GraphQL queries over generic entities for performance
- Use cursor-based pagination for stable pagination in UIs
- Limit requested fields to only what the client needs
- Restart Torii after world migrations to refresh indexed schemas
Example use cases
- Run positionModels queries to fetch player positions with pagination
- Subscribe to entityUpdated for a player entity to drive live UIs
- Stream eventEmitted subscriptions to build an audit or analytics pipeline
- Connect to torii.db with sqlite3 for custom aggregations and counts
- Integrate Torii with Apollo Client to serve a real-time dashboard
FAQ
By default Torii serves GraphQL at http://localhost:8080/graphql and gRPC/WebSocket on port 8080; RPC defaults to http://localhost:5050.
How do I make Torii persistent for production?
Start Torii with --db-dir pointing to a directory (e.g., --db-dir ./torii-db) to persist SQLite files instead of using the in-memory DB.