Skip to content

Commit

Permalink
add ormi subgraph hosting guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian authored and Julian committed Oct 1, 2024
1 parent dec5249 commit a1ce6db
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions guides/ormi-subgraph-hosting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Using Ormi's 0xgraph Subgraph Hosting Solution

## Introduction

[Ormi Labs](https://app.0xgraph.xyz/dashboard/api) offers a powerful solution for hosting and managing subgraphs, which can be particularly useful for Rollkit rollups and their ecosystems - enabling dApps with low-latency and reliable real-time data. This beginner guide aims to demonstrate the capabilities of 0xgraph's subgraph hosting solution for rollup teams.

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].

This guide will walk you through the process of using Ormi's services to host your Subgraphs, providing insight into how these services can enhance the real-time data querying capabilities of your Rollkit rollups ecosystem once network support is implemented.

## Prerequisites

- Node.js installed on your system
- Basic understanding of Subgraphs and GraphQL APIs

## Getting Started with Ormi

### 1. Install the 0xgraph CLI
First, install the 0xgraph CLI tool:
```bash
npm i @xgraph/cli
```
First, install the 0xgraph CLI tool:

### 2. Authentication
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.

## Creating and Deploying Your Subgraph
### 1. Prepare Your Subgraph
Ensure your Subgraph project follows the standard structure:
- Subgraph.yaml: The manifest file
- Schema.graphql: The schema file
- Mapping files (typically in AssemblyScript)

### 2. Generate Types and Mappings
Run the following command in your Subgraph project root:
```bash
0xgraph codegen
```
### 3. Build Your Subgraph
Build your Subgraph using:
```bash
0xgraph build
```
### 4. Create/Register Your Subgraph
Choose a unique name for your Subgraph and register it
```bash
0xgraph create <my-subgraph-name>
```
### 5. Deploy Your Subgraph
Deploy your subgraph to Ormi's hosted service:
```bash
0xgraph deploy
```
Follow the prompts to specify your subgraph name and version.


## Conclusion
By leveraging Ormi for subgraph hosting, Rollkit rollup teams can gain valuable insights into the powerful data indexing and querying capabilities that can enhance their ecosystems. This integration paves the way for more efficient data retrieval and analysis, potentially improving the overall performance and functionality of Rollkit-based projects.

The 0xgraph solution offers a glimpse into the future of decentralized data management for rollups, promising low-latency access to real-time data that can significantly boost dApp performance and user experience. As the blockchain space continues to evolve, tools like Ormi's subgraph hosting service are becoming increasingly crucial for building scalable and efficient decentralized applications.

While this guide provides a starting point, remember that full integration requires network support for your specific rollup. We encourage rollup teams to reach out to Ormi Labs to discuss adding support for their networks, unlocking the full potential of this powerful tool for their ecosystems.

For more detailed information on subgraph development and best practices, refer to The Graph's official documentation and the Messari subgraphs repository. 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.

Links: [Ormi Labs](https://ormi.xyz/) | [0xgraph docs](https://docs.ormi.xyz/0xgraph) | [X](https://x.com/ormilabs)

0 comments on commit a1ce6db

Please sign in to comment.