Skip to content
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

Add Ormi Subgraph Hosting Guide #472

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ljuliandicarlo
Copy link

@ljuliandicarlo ljuliandicarlo commented Oct 1, 2024

Adding Ormi Subgraph hosting guide for rollkit rollups.

Summary by CodeRabbit

  • New Features
    • Introduced a comprehensive guide for utilizing Ormi's 0xgraph subgraph hosting solution for Rollkit rollups.
    • Detailed steps for installation, authentication, project preparation, and deployment of subgraphs.
  • Documentation
    • Added additional resources and links for further reference on Ormi Labs and related documentation.

Copy link
Contributor

coderabbitai bot commented Oct 1, 2024

Walkthrough

The changes introduce a comprehensive guide for utilizing Ormi's 0xgraph subgraph hosting solution, specifically designed for Rollkit rollups. It includes prerequisites such as Node.js and familiarity with Subgraphs and GraphQL APIs. The guide covers the installation of the 0xgraph CLI tool, API key authentication, and detailed steps for creating and deploying a subgraph, including project structure preparation and deployment to Ormi's service. Additional resources are provided for further exploration.

Changes

File Change Summary
guides/ormi-subgraph-hosting.md Added a guide for Ormi's 0xgraph subgraph hosting solution, including prerequisites, installation, and deployment steps.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant OrmiService

    User->>CLI: Install 0xgraph CLI tool
    User->>CLI: Authenticate with API key
    User->>CLI: Create subgraph project
    CLI->>CLI: Generate types and mappings
    CLI->>CLI: Build subgraph
    User->>CLI: Register subgraph
    CLI->>OrmiService: Deploy subgraph
    OrmiService-->>CLI: Confirm deployment
    CLI-->>User: Deployment successful
Loading

Poem

In the fields of code, a rabbit hops,
With Ormi's guide, the learning never stops.
Subgraphs and rollups, a dance so fine,
Deploying with ease, all in a line.
Hooray for the changes, let's cheer and play,
For a brighter tomorrow, in the code we lay! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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: 0

🧹 Outside diff range and nitpick comments (4)
guides/ormi-subgraph-hosting.md (4)

7-7: Consider making the email address clickable for better user experience.

The email address provided for contacting the Ormi team could be formatted as a clickable link to make it easier for users to reach out.

You can update the line as follows:

Please note that network support for your specific rollup will need to be added before subgraphs can be fully migrated. To get network support added for your rollup, please reach out to the Ormi team at [[email protected]](mailto:[email protected]).
🧰 Tools
🪛 Markdownlint

7-7: null
Bare URL used

(MD034, no-bare-urls)


13-14: Consider adding resource links for Subgraphs and GraphQL APIs.

To assist users who may not be familiar with Subgraphs or GraphQL APIs, it would be helpful to provide links to introductory resources.

You could update the lines as follows:

- Node.js installed on your system
- Basic understanding of [Subgraphs](https://thegraph.com/docs/en/about/introduction/) and [GraphQL APIs](https://graphql.org/learn/)

30-30: Format the URL as a clickable link.

To improve readability and follow Markdown best practices, the bare URL should be formatted as a clickable link.

Update the line as follows:

When prompted, enter your deploy key. You can obtain this key by signing up at [https://app.0xgraph.xyz/dashboard/api](https://app.0xgraph.xyz/dashboard/api).
🧰 Tools
🪛 LanguageTool

[grammar] ~30-~30: The word ‘deploy’ is a verb. Did you mean the noun “deployment” (= release, placement)?
Context: ...raph auth ``` When prompted, enter your deploy key. You can obtain this key by signing...

(PREPOSITION_VERB)

🪛 Markdownlint

30-30: null
Bare URL used

(MD034, no-bare-urls)


69-69: Consider adding specific links to the mentioned resources.

To make it easier for users to access additional information, consider adding direct links to The Graph's official documentation and the Messari subgraphs repository.

You could update the paragraph as follows:

For more detailed information on subgraph development and best practices, refer to [The Graph's official documentation](https://thegraph.com/docs/) and the [Messari subgraphs repository](https://github.com/messari/subgraphs). Stay tuned for updates as Ormi continues to expand its network support and feature set, bringing advanced data solutions to an ever-growing number of blockchain ecosystems.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between dec5249 and a1ce6db.

📒 Files selected for processing (1)
  • guides/ormi-subgraph-hosting.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
guides/ormi-subgraph-hosting.md

[grammar] ~30-~30: The word ‘deploy’ is a verb. Did you mean the noun “deployment” (= release, placement)?
Context: ...raph auth ``` When prompted, enter your deploy key. You can obtain this key by signing...

(PREPOSITION_VERB)

🪛 Markdownlint
guides/ormi-subgraph-hosting.md

7-7: null
Bare URL used

(MD034, no-bare-urls)


30-30: null
Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (2)
guides/ormi-subgraph-hosting.md (2)

32-60: LGTM! Clear and well-structured instructions.

The step-by-step guide for creating and deploying a subgraph is clear, concise, and easy to follow. The use of code blocks for commands enhances readability.


71-71: LGTM! Useful and well-formatted links provided.

The links section provides relevant resources for users to find more information about Ormi Labs and their services. The formatting is clear and consistent.

@ljuliandicarlo
Copy link
Author

@tuxcanfly @tzdybal @gupadhyaya I am getting the following error in my PR:

`Run gh` pr edit https://github.com/rollkit/docs/pull/472 --add-assignee ljuliandicarlo
'ljuliandicarlo' not found
Error: Process completed with exit code 1.

Is there any way to resolve this error, so that we can merge this PR?

For context:

I am from Ormi Labs and we are looking to add a guide for our Subgraph hosting solution to the guide folder. Manav is the person on the team we are in contact with and he told us to do this PR to get our docs merged.

@tuxcanfly
Copy link
Contributor

@MSevey Think the previews action is missing permissions for external contributors:

    permissions:
      contents: write
      pull-requests: write
      repository-projects: write

```bash
npm i @xgraph/cli
```
First, install the 0xgraph CLI tool:
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate

Suggested change
First, install the 0xgraph CLI tool:

Comment on lines +26 to +30
Authenticate with Ormi using your API key:
```bash
0xgraph auth
```
When prompted, enter your deploy key. You can obtain this key by signing up at https://app.0xgraph.xyz/dashboard/api.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd reverse this since the user is going to need the key before running the command.

Suggested change
Authenticate with Ormi using your API key:
```bash
0xgraph auth
```
When prompted, enter your deploy key. You can obtain this key by signing up at https://app.0xgraph.xyz/dashboard/api.
Next you'll need to authenticate with Ormi using your API key. You can obtain this key by signing up at https://app.0xgraph.xyz/dashboard/api.
Once you have your API key, authenticate with Ormi using the following command:
```bash
0xgraph auth

When prompted, enter your deploy key.

@MSevey
Copy link
Contributor

MSevey commented Oct 18, 2024

@MSevey Think the previews action is missing permissions for external contributors:

    permissions:
      contents: write
      pull-requests: write
      repository-projects: write

@tuxcanfly this is a github security measure. External contributors can't run write actions. So it is expected to fail, which is why I created the build CI to verify the docs still build. But to see the rendered site for external contributors we have to build it locally.

@MSevey
Copy link
Contributor

MSevey commented Oct 18, 2024

@tuxcanfly @tzdybal @gupadhyaya I am getting the following error in my PR:

`Run gh` pr edit https://github.com/rollkit/docs/pull/472 --add-assignee ljuliandicarlo
'ljuliandicarlo' not found
Error: Process completed with exit code 1.

Is there any way to resolve this error, so that we can merge this PR?

For context:

I am from Ormi Labs and we are looking to add a guide for our Subgraph hosting solution to the guide folder. Manav is the person on the team we are in contact with and he told us to do this PR to get our docs merged.

Don' worry about it. The only required CI for external contributors is the build ci which ran and is passing.

Copy link
Contributor

@MSevey MSevey left a comment

Choose a reason for hiding this comment

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

This guide needs to be added to the menu bar. That is set here:

Add it to the guides overview page here below the IBC guide

* [Use Ignite to create a Rollkit app](/guides/ignite-rollkit)

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.

3 participants