subgraph-migration

Migrate TheGraph subgraphs to Envio HyperIndex with test-driven verification.

2|3|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/moose-code/polymarket-indexer --skill subgraph-migration-moose-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subgraph-migration
Source: https://github.com/moose-code/polymarket-indexer/tree/main/.claude/skills/subgraph-migration
Command: npx skills add https://github.com/moose-code/polymarket-indexer --skill subgraph-migration-moose-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Migrating a TheGraph subgraph to Envio HyperIndex can be complex and error-prone; this Skill provides a structured, test-driven approach to convert schemas, translate handlers, and verify results against subgraph data.

Core Features & Use Cases

  • Step-by-step migration guidance from TheGraph to Envio HyperIndex
  • Schema conversion: remove @entity, convert Bytes to String, apply @derivedFrom for relationships
  • Handler translation and verification: map TheGraph handlers to Envio equivalents and validate against subgraph data
  • Reusable reference material shows patterns, pitfalls, and best practices for tests and migrations

Quick Start

Follow the migration steps to implement Envio handlers and run tests until the migration is verified.

Frequently Asked Questions about subgraph-migration

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

FAQPage Schema
How do I migrate a TheGraph subgraph to Envio HyperIndex?

Migrating a TheGraph subgraph to Envio HyperIndex involves a test-driven workflow for schema conversion, handler translation, and data verification. You implement Envio handlers and run tests until the migration is fully verified against actual subgraph data.

What is the best way to convert TheGraph schema entities for Envio HyperIndex?

The best way to convert TheGraph schema entities for Envio HyperIndex is to remove the @entity directive, convert Bytes fields to String, and apply @derivedFrom for relationships. These schema conversion steps ensure proper structure in the new environment.

How does test-driven development verify a subgraph migration?

Test-driven development verifies a subgraph migration by rigorously testing the translated Envio handlers against actual subgraph data. You implement handlers and run comprehensive runtime tests until the output matches the original subgraph's results.

Can I use my existing TheGraph handlers when moving to Envio HyperIndex?

You cannot directly copy TheGraph handlers to Envio HyperIndex; you must translate them using specific handler translation patterns. The migration process maps TheGraph handlers to Envio equivalents and validates them against subgraph data to ensure functional parity.

What are common pitfalls when migrating from TheGraph to Envio HyperIndex?

Common pitfalls when migrating from TheGraph to Envio HyperIndex include incorrectly mapping schema relationships and failing to validate translated handlers. The migration guidance provides reusable reference material showing best practices, patterns, and pitfalls to avoid during tests.