subgraph-indexing

Solid

Subgraph development for The Graph protocol. Includes manifest configuration, GraphQL schema design, AssemblyScript handlers, entity relationships, and deployment to hosted and decentralized networks.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Subgraph Indexing Skill Subgraph development for The Graph protocol, enabling efficient blockchain data indexing and querying. ## Capabilities - **Manifest Configuration**: Write subgraph.yaml files - **Schema Design**: Define GraphQL schemas for entities - **Event Handlers**: Implement AssemblyScript handlers - **Entity Relationships**: Handle derived fields and relations - **Local Testing**: Test with Graph Node locally - **Deployment**: Deploy to hosted and decentralized networks - **Performance**: Optimize indexing performance - **Reorg Handling**: Handle chain reorganizations ## Installation ```bash # Install Graph CLI npm install -g @graphprotocol/graph-cli # Verify graph --version ``` ## Project Setup ### Initialize Subgraph ```bash # Initialize from existing contract graph init --product subgraph-studio \ --from-contract 0x... \ --network mainnet \ --abi ./abi.json \ my-subgraph cd my-subgraph ``` ### Project Structure ``` my-subgraph/ ├── subgraph.yaml # Manifest ├── schema.graphql # GraphQL schema ├── src/ │ └── mapping.ts # Event handlers ├── abis/ │ └── Contract.json # Contract ABIs ├── tests/ │ └── contract.test.ts # Unit tests └── package.json ``` ## Manifest (subgraph.yaml) ```yaml specVersion: 0.0.5 schema: file: ./schema.graphql dataSources: - kind: ethereum name: Token network: mainnet source: address: "0x..." abi: Token startBlock: 18000000 mapping: kin...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Related Skills