dojo-indexer

Configures Torii to index Dojo world state changes for GraphQL, gRPC, and SQL access.

53|92|Updated Mar 28, 2023
One-click install
npx skills add https://github.com/dojoengine/book --skill dojo-indexer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dojo-indexer
Source: https://github.com/dojoengine/book/tree/main/skills/dojo-indexer
Command: npx skills add https://github.com/dojoengine/book --skill dojo-indexer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill configures and maintains the Dojo Torii indexer to provide fast, real-time access to world state data via GraphQL, gRPC, and SQL for client applications and dashboards.

Core Features & Use Cases

  • GraphQL API: Query indexed world entities and models for client dashboards and analytics.
  • Real-time subscriptions: Subscribe to entity updates and world events to drive live UIs.
  • Production-ready configuration: Manage startup, indexing, and data access with configurable options for development and production environments.

Quick Start

Start Torii against a deployed world: torii --world <WORLD_ADDRESS> Production-ready run: torii --world <WORLD_ADDRESS> --db-dir ./torii-db GraphQL API is available at http://localhost:8080/graphql gRPC API is available at http://localhost:8080

Frequently Asked Questions about dojo-indexer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I index Dojo world state for GraphQL and gRPC queries?▼

To index Dojo world state, run the Torii indexer against your deployed world address to expose GraphQL and gRPC endpoints for querying entities and models. Start with `torii --world <WORLD_ADDRESS>` to enable real-time data access.

What is the best way to subscribe to live entity updates in a Dojo world?▼

Subscribing to live entity updates requires the Torii indexer, which processes state changes to provide real-time subscriptions via its gRPC API. This allows client applications to receive continuous event updates for driving live user interfaces.

Can I use SQL-backed analytics for Dojo models in production?▼

Yes, Torii supports SQL-backed analytics for Dojo models in production environments. Run a production-ready configuration using `torii --world <WORLD_ADDRESS> --db-dir ./torii-db` to manage persistent data storage and enable flexible querying across your models.

Does Torii expose separate endpoints for GraphQL and gRPC APIs?▼

Torii exposes both GraphQL and gRPC APIs for accessing indexed world data. By default, the GraphQL API is available at `http://localhost:8080/graphql` and the gRPC API is accessible at `http://localhost:8080` upon startup.

How do I configure Torii for development versus production deployments?▼

Configure Torii for development by running a basic startup command, while production deployments require specifying a persistent database directory using the `--db-dir` flag. This ensures durable data storage and stable endpoint exposure for production applications.