Skip to content

subgraph migration guide #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2025
Merged

subgraph migration guide #662

merged 2 commits into from
Jun 19, 2025

Conversation

DenhamPreen
Copy link
Contributor

@DenhamPreen DenhamPreen commented Jun 19, 2025

Summary by CodeRabbit

  • Documentation
    • Updated environment variable examples and instructions to consistently use the ENVIO_ prefix.
    • Added a comprehensive guide on environment variables, including setup, best practices, and troubleshooting.
    • Expanded and rewrote the migration guide for converting TheGraph subgraphs to HyperIndex, with detailed steps and examples.
    • Updated Chiliz network documentation to reflect the new chain ID 88888 and corresponding endpoint URLs.
    • Improved sidebar navigation by adding the new environment variables guide.

@DenhamPreen DenhamPreen requested a review from moose-code June 19, 2025 14:10
Copy link

vercel bot commented Jun 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
envio-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 2:10pm

Copy link
Contributor

coderabbitai bot commented Jun 19, 2025

Walkthrough

The documentation was updated to standardize environment variable usage with an ENVIO_ prefix, introduce a new Environment Variables guide, and expand the migration guide for transitioning from TheGraph to HyperIndex. Additionally, the Chiliz network ID was updated from 8888 to 88888 across relevant documents, and the sidebar was updated to include the new guide.

Changes

Files/Group Change Summary
docs/HyperIndex/Guides/configuration-file.mdx Updated environment variable examples to use ENVIO_ prefix; revised interpolation syntax and links.
docs/HyperIndex/Guides/environment-variables.md Added new guide explaining environment variable usage, best practices, and troubleshooting.
docs/HyperIndex/migration-guide.md Rewrote and expanded migration guide for TheGraph to HyperIndex, with examples and advanced tips.
docs/HyperIndex/supported-networks/chiliz.md Updated Chiliz network ID and URLs from 8888 to 88888 in documentation and YAML examples.
docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md,
docs/HyperSync/hypersync-supported-networks.md
Updated Chiliz network ID and endpoint URLs from 8888 to 88888 in tables and descriptions.
sidebarsHyperIndex.js Added "Guides/environment-variables" to the sidebar navigation under Guides.

Poem

🐇
A hop and a skip through docs anew,
With ENVIO_ vars, our configs grew.
Chiliz IDs now five digits strong,
Migration guides to help along.
A sidebar fresh, a guide in place—
HyperIndex leaps ahead with grace!
🌱✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
docs/HyperSync/hypersync-supported-networks.md (1)

49-49: Nitpick: wrap bare URLs to satisfy markdownlint MD034. Consider enclosing the URLs in angle brackets (<...>) or using markdown links to avoid bare URLs.
Example:

-| Chiliz               | 88888      | https://chiliz.hypersync.xyz or https://88888.hypersync.xyz                         | 🪨   |                 |
+| Chiliz               | 88888      | <https://chiliz.hypersync.xyz> or <https://88888.hypersync.xyz>                         | 🪨   |                 |
docs/HyperIndex/migration-guide.md (1)

30-35: Unify migration steps list and improve wording
Use sequential numbering, correct "copy paste" to "copy and paste", and add a comma for the introductory sentence.

- Migration consists of three major steps:
- 1. Subgraph.yaml migration 
- 1. Schema migration - near copy paste
- 1. Event handler migration
+ Migration consists of three major steps:
+ 1. Subgraph.yaml migration
+ 2. Schema migration — near copy and paste
+ 3. Event handler migration

- At any point in the migration run 
+ At any point in the migration, run 
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6fe21f2 and 8ba364c.

📒 Files selected for processing (7)
  • docs/HyperIndex/Guides/configuration-file.mdx (1 hunks)
  • docs/HyperIndex/Guides/environment-variables.md (1 hunks)
  • docs/HyperIndex/migration-guide.md (2 hunks)
  • docs/HyperIndex/supported-networks/chiliz.md (2 hunks)
  • docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md (1 hunks)
  • docs/HyperSync/hypersync-supported-networks.md (1 hunks)
  • sidebarsHyperIndex.js (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/HyperSync/hypersync-supported-networks.md

49-49: Bare URL used
null

(MD034, no-bare-urls)


49-49: Bare URL used
null

(MD034, no-bare-urls)

🪛 LanguageTool
docs/HyperIndex/migration-guide.md

[typographical] ~10-~10: Consider adding a comma here.
Context: ...ate from TheGraph to HyperIndex :::info Please reach out to our team on [Discord](http...

(PLEASE_COMMA)


[grammar] ~32-~32: Did you mean “copy and paste”?
Context: ...l migration 1. Schema migration - near copy paste 1. Event handler migration At any poin...

(COPY_PASTE)


[uncategorized] ~39-~39: Possible missing comma found.
Context: ...gration run pnpm envio codegen to verify the config.yaml and schema.graphql ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~136-~136: As an alternative to the over-used intensifier ‘quite’, consider replacing this phrase.
Context: ...yscript is a subset of typescript, it's quite simple to copy and paste the code, especially ...

(EN_WEAK_ADJECTIVE)


[uncategorized] ~188-~188: Possible missing comma found.
Context: ...ecially powerful that go above subgraph implementations and so in some cases you may want to op...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~191-~191: A comma may be missing after the conjunctive/linking adverb ‘However’.
Context: ...st common need for multichain indexing. However comes with tradeoffs worth understandin...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[uncategorized] ~194-~194: Do not mix variants of the same word (‘optimize’ and ‘optimise’) within a single text.
Context: ...s). - Loaders are a powerful feature to optimize historical sync performance. You can re...

(EN_WORD_COHERENCY)


[style] ~195-~195: In American English, abbreviations like “etc.” require a period.
Context: ...in data too or send messages to a queue etc for fetching external data, you can fur...

(ETC_PERIOD)

🔇 Additional comments (9)
docs/HyperSync/hypersync-supported-networks.md (1)

49-49: Chiliz network ID and endpoints updated correctly. The chain ID was incremented from 8888 to 88888 and both URL variants have been updated.
Run this script to verify no lingering references to the old Chiliz ID:

#!/bin/bash
# Verify no legacy '8888' references remain (excluding '88888')
rg -n -e '8888([^8]|$)' docs/HyperSync/hypersync-supported-networks.md
docs/HyperSync/HyperRPC/hyperrpc-url-endpoints.md (1)

41-41: Chiliz network ID and RPC endpoints updated correctly. The chain ID value was changed to 88888, and both endpoint URLs now reflect this.

docs/HyperIndex/supported-networks/chiliz.md (2)

14-16: Chiliz Chain ID and endpoints updated correctly. The chain ID in the table and both HyperSync/HyperRPC URLs have been updated to 88888.


42-42: Chiliz network ID in example config updated correctly. The YAML snippet now uses id: 88888 for the Chiliz network.

sidebarsHyperIndex.js (1)

57-59: Include new Environment Variables guide in sidebar
The new guide is correctly added under "Guides" and follows naming conventions.

docs/HyperIndex/Guides/configuration-file.mdx (3)

210-214: Env var placeholders updated correctly
The ENVIO_ prefix and default interpolation syntax are consistent with the new Environment Variables guide.


220-220: Example startup command updated
The pnpm dev example uses the correct ENVIO_ variables.


225-228: Interpolation syntax section updated
The syntax bullets and link to the Environment Variables guide are accurate and clear.

docs/HyperIndex/Guides/environment-variables.md (1)

1-6: Validate frontmatter metadata
The id, title, sidebar_label, and slug are correctly configured for this new guide.

Comment on lines +59 to +62
## Configuration File

For use of environment variables in your configuration file, read the docs here: [Configuration File](../HyperIndex/configuration-file).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix Configuration File link
The link should reference the local guide in the same directory.

- [Configuration File](../HyperIndex/configuration-file)
+ [Configuration File](./configuration-file)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Configuration File
For use of environment variables in your configuration file, read the docs here: [Configuration File](../HyperIndex/configuration-file).
## Configuration File
For use of environment variables in your configuration file, read the docs here: [Configuration File](./configuration-file).
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 59 to 62, the
link to the Configuration File currently points to
../HyperIndex/configuration-file, which is incorrect. Update the link to
reference the local guide file in the same directory by changing the URL to
./configuration-file or the correct relative path within the same folder.

Comment on lines +23 to +31
```bash
# Blockchain RPC URL
ENVIO_RPC_URL=https://arbitrum.direct.dev/your-api-key

# Starting block number for indexing
ENVIO_START_BLOCK=12345678

# Number of blocks to process in each batch
ENVIO_COINGECKO_API_KEY=api-key
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix misaligned example comment
The comment # Number of blocks to process in each batch does not describe ENVIO_COINGECKO_API_KEY.

- # Number of blocks to process in each batch
- ENVIO_COINGECKO_API_KEY=api-key
+ # CoinGecko API key for price data retrieval
+ ENVIO_COINGECKO_API_KEY=your-coingecko-api-key
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```bash
# Blockchain RPC URL
ENVIO_RPC_URL=https://arbitrum.direct.dev/your-api-key
# Starting block number for indexing
ENVIO_START_BLOCK=12345678
# Number of blocks to process in each batch
ENVIO_COINGECKO_API_KEY=api-key
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 23 to 31, the
comment above ENVIO_COINGECKO_API_KEY is incorrect and describes the wrong
variable. Update the comment to correctly describe ENVIO_COINGECKO_API_KEY, such
as indicating it is the API key for CoinGecko, and ensure the comment about the
number of blocks to process in each batch is placed above the appropriate
environment variable if it exists.

Comment on lines +79 to +81
4. Confirm that the values are correctly formatted

For more help, see our [Troubleshooting Guide](../HyperIndex/logging).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct Troubleshooting Guide link
Update the path to ../Troubleshoot/logging to match the sidebar configuration.

- For more help, see our [Troubleshooting Guide](../HyperIndex/logging).
+ For more help, see our [Troubleshooting Guide](../Troubleshoot/logging).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
4. Confirm that the values are correctly formatted
For more help, see our [Troubleshooting Guide](../HyperIndex/logging).
4. Confirm that the values are correctly formatted
For more help, see our [Troubleshooting Guide](../Troubleshoot/logging).
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 79 to 81, the
link to the Troubleshooting Guide is incorrect. Update the link path from
../HyperIndex/logging to ../Troubleshoot/logging to match the sidebar
configuration and ensure the link directs to the correct documentation page.

Comment on lines +53 to +57
### Hosted Service

When using the Envio Hosted Service, you can configure environment variables through the Envio platform's dashboard. Remember that all variables must still be prefixed with `ENVIO_`.

For more information about environment variables in the hosted service, see the [Hosted Service documentation](../HyperIndex/hosted-service).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct link to Hosted Service docs
Update the relative path to point to the Hosted_Service/hosted-service guide.

- see the [Hosted Service documentation](../HyperIndex/hosted-service)
+ see the [Hosted Service documentation](../Hosted_Service/hosted-service)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Hosted Service
When using the Envio Hosted Service, you can configure environment variables through the Envio platform's dashboard. Remember that all variables must still be prefixed with `ENVIO_`.
For more information about environment variables in the hosted service, see the [Hosted Service documentation](../HyperIndex/hosted-service).
### Hosted Service
When using the Envio Hosted Service, you can configure environment variables through the Envio platform's dashboard. Remember that all variables must still be prefixed with `ENVIO_`.
For more information about environment variables in the hosted service, see the [Hosted Service documentation](../Hosted_Service/hosted-service).
🤖 Prompt for AI Agents
In docs/HyperIndex/Guides/environment-variables.md around lines 53 to 57, the
link to the Hosted Service documentation uses an incorrect relative path. Update
the link to point to ../HyperIndex/Hosted_Service/hosted-service instead of
../HyperIndex/hosted-service to correctly reference the Hosted Service guide.

Comment on lines +3 to +8
title: Migrate from a Subgraph to HyperIndex
sidebar_label: Migrate from TheGraph
slug: /migration-guide
---

# Migrate from TheGraph and Other Indexers to HyperIndex
# Migrate from TheGraph to HyperIndex
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Inconsistent title and header
The frontmatter title ("Migrate from a Subgraph to HyperIndex") and the H1 header ("Migrate from TheGraph to HyperIndex") differ. Standardize the phrasing for clarity.

--- title: Migrate from a Subgraph to HyperIndex
+++ title: Migrate from TheGraph subgraph to HyperIndex

--- # Migrate from TheGraph to HyperIndex
+++ # Migrate from TheGraph subgraph to HyperIndex
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
title: Migrate from a Subgraph to HyperIndex
sidebar_label: Migrate from TheGraph
slug: /migration-guide
---
# Migrate from TheGraph and Other Indexers to HyperIndex
# Migrate from TheGraph to HyperIndex
title: Migrate from TheGraph subgraph to HyperIndex
sidebar_label: Migrate from TheGraph
slug: /migration-guide
---
# Migrate from TheGraph subgraph to HyperIndex
🤖 Prompt for AI Agents
In docs/HyperIndex/migration-guide.md around lines 3 to 8, the frontmatter title
and the H1 header have inconsistent phrasing. Update either the frontmatter
title or the H1 header so both use the same wording, ensuring consistency and
clarity in the document's main topic.


# Environment Variables

Environment variables are a crucial part of configuring your Envio indexer. They allow you to manage sensitive information and configuration settings without hardcoding them in your codebase.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@moose-code moose-code left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvements!

@moose-code moose-code merged commit 295088f into main Jun 19, 2025
3 checks passed
@moose-code moose-code deleted the dp/feat/subgraph-migration-guide branch June 19, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants