indexing-schema

Define and validate GraphQL schema for Polymarket V2 indexer projects.

43|9|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/enviodev/polymarket-v2-indexer --skill indexing-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: indexing-schema
Source: https://github.com/enviodev/polymarket-v2-indexer/tree/main/.claude/skills/indexing-schema
Command: npx skills add https://github.com/enviodev/polymarket-v2-indexer --skill indexing-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually crafting or updating schema.graphql for Polymarket V2 can lead to inconsistent entity definitions, missing directives, and runtime errors in code generation.

Core Features & Use Cases

  • Entity & Field Rules: Enforces id: ID! as the first field and validates naming conventions.
  • Relationship Handling: Clarifies correct use of entity references versus _id suffixes for TypeScript handlers.
  • Directive Guidance: Provides exact syntax for @derivedFrom, @index, and @config directives, including composite indexes and precision settings.
  • Array & Enum Support: Details supported array structures and enum definitions for robust schema design.
  • Practical Scenario: Ideal for developers defining new Polymarket entities, updating existing types, or troubleshooting codegen mismatches.

Quick Start

Use the indexing-schema skill to review and improve your schema.graphql file before running code generation.

Frequently Asked Questions about indexing-schema

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

FAQPage Schema
How do I define GraphQL entities for Polymarket V2 indexing?

Correct GraphQL schema for Polymarket V2 indexing requires `id: ID!` as the first field, validated naming conventions, and proper directives like `@index` and `@config` to ensure robust entity definitions and prevent runtime errors.

How does the @derivedFrom directive work in HyperIndex schema?

The `@derivedFrom` directive in a HyperIndex schema maps a derived entity field to its corresponding relationship, clarifying correct entity references versus `_id` suffixes for TypeScript handlers during code generation.

What is the correct way to configure composite indexes and precision in a GraphQL schema?

Configuring composite indexes and precision in a GraphQL schema involves applying exact syntax for the `@index` and `@config` directives, ensuring appropriate precision settings are set to optimize HyperIndex project performance.

Does HyperIndex support enums and array structures in a schema.graphql file?

Yes, HyperIndex supports robust schema design through detailed enum definitions and supported array structures within the schema.graphql file to properly format Polymarket V2 data entities.

Why does my Polymarket V2 codegen fail with mismatched entity relationships?

Codegen mismatches often occur from incorrect entity relationships or missing directives in schema.graphql; clarifying entity references versus `_id` suffixes for TypeScript handlers resolves these runtime errors.

Can I use custom directives to optimize GraphQL schema for Polymarket indexing?

You can optimize Polymarket indexing by applying exact syntax for `@derivedFrom`, `@index`, and `@config` directives, including configuring composite indexes and precision settings within your schema definitions.