subgraph-ops

Diagnose and resolve subgraph indexing issues across local environments.

1|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/dappvibe/pexfi --skill subgraph-ops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subgraph-ops
Source: https://github.com/dappvibe/pexfi/tree/main/.agent/skills/subgraph-ops
Command: npx skills add https://github.com/dappvibe/pexfi --skill subgraph-ops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subgraph operations and indexing require careful local environment management, including synchronized codegen, controlled reindexing, and reliable deployment workflows to keep data consistent.

Core Features & Use Cases

  • Synchronize TypeScript types by running codegen after changes to schema.graphql or subgraph.yaml to ensure types and entity definitions stay in sync.
  • Perform safe, controlled reindexing by versioning deployments (e.g., -l v0.0.x) or using graph remove for reset, without affecting other services.
  • Deploy updates to mappings and verify deployed addresses on the local Graph node, ensuring indexing remains accurate after changes.
  • Troubleshoot and validate the local subgraph node using the provided guidance to reduce indexing downtime and configuration drift.

Quick Start

Run the codegen after editing the schema or mapping, then redeploy the subgraph to the local Graph node to apply changes.

Frequently Asked Questions about subgraph-ops

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

FAQPage Schema
How do I run codegen after changing schema.graphql for a subgraph?

Run codegen after editing schema.graphql or subgraph.yaml to synchronize TypeScript types and entity definitions, ensuring your AssemblyScript mappings reference accurate types before redeploying the subgraph to the local Graph node.

What is the best way to safely reindex a subgraph without affecting other services?

Perform controlled reindexing by versioning deployments with labels like v0.0.x or using graph remove to reset. This isolates reindexing to the targeted subgraph without impacting other services running on the local Graph node.

How do I deploy subgraph mappings to a local Graph node and verify the update?

Deploy updated mappings to the local Graph node and verify the deployed addresses. This validation step ensures indexing remains accurate and configuration drift is prevented after applying mapping changes.

Why does my subgraph indexing fail after modifying the GraphQL schema?

Subgraph indexing fails after schema modifications when codegen is not synchronized. You must run codegen to regenerate TypeScript types for your mappings before redeploying the subgraph to the local Graph node.

Do I need AssemblyScript to write subgraph mappings for the Graph Protocol?

Yes, AssemblyScript is required to write subgraph mappings for the Graph Protocol. Codegen generates the necessary TypeScript types from your schema.graphql to support these mappings during indexing.

When should I use graph remove instead of versioned deployments for reindexing?

Use graph remove to completely reset a subgraph deployment, while versioned deployments like v0.0.x perform controlled reindexing. Choose graph remove when you need a full reset without preserving previous indexing state.