Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subgraph Plugin
Summary
Adds a Subgraph plugin so you can create and deploy Hedera testnet subgraphs from the CLI using The Graph and the Hedera JSON-RPC relay (e.g. Hashio). You scaffold a project, optionally start a local graph node with Docker, then run codegen, build, and deploy in one command.
Commands
subgraph createsubgraph deploysubgraph start-nodeWhy This Plugin?
Indexing Hedera contract events with The Graph usually means cloning an example repo, wiring config, and running several Graph CLI steps by hand. This plugin lets you create a ready-to-use subgraph from one command and deploy it (locally or, with your own setup, to a remote indexer) without memorizing the workflow.
What's Included
--name,--contract-address,--start-block; deploy supports--dir,--name,--version-label,--skip-codegen,--skip-build.npx @graphprotocol/graph-cliso the Graph CLI does not need to be installed globally.Architecture
PluginManifest.CommandExecutionResult(ADR-003).Prerequisites
npxwhen deploying.subgraph start-nodeto run a local graph node. You can instead deploy to a remote indexer (e.g. Mobula) and skip Docker.Note: The first
npm installinside a created subgraph project can take several minutes. If it hangs, trynpm cache clean --forceand runnpm installagain, or useyarn.References