From 0e6687796937b4b874c83f3485f46d57102e9c5a Mon Sep 17 00:00:00 2001 From: Jerry Okolo Date: Tue, 11 Nov 2025 18:28:34 +0100 Subject: [PATCH 01/15] Add migration guide for subgraphs to The Graph Network --- .../migration-guides/migrate-from-alchemy.mdx | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx new file mode 100644 index 000000000000..21d1da46f1b9 --- /dev/null +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -0,0 +1,156 @@ +--- +title: Migrate Your Subgraph to The Graph Network +--- + +# Migrate Your Subgraph to The Graph Network + +This guide walks you through migrating or deploying an existing subgraph to **The Graph Network** — a decentralized and performant Graph Node infrastructure. +You’ll learn how to build, test locally with **Graph Node Dev Mode (`gnd`)**, and deploy to **The Graph Studio**. + +--- + +## 1. Prerequisites + +You’ll need: +- Your subgraph source code (`subgraph.yaml`, `schema.graphql`, `src/mapping.ts`) +- [Node.js](https://nodejs.org), Yarn, and `graph-cli`: + ```bash + npm install -g @graphprotocol/graph-cli + ``` +- A [The Graph Studio](https://thegraph.com/studio) account and access token + +--- + +## 2. Install the CLI + +Install and authenticate the CLI: + +```bash +npm install -g @graphprotocol/graph-cli +graph auth --studio +``` + +--- + +## 3. Prepare and Build + +If you don’t already have a project, initialize one: + +```bash +graph init --from-contract +``` + +Then build it: + +```bash +yarn codegen && yarn build +``` + +--- + +## 4. Test Locally with Graph Node Dev Mode + +`gnd` lets you run a local Graph Node instance for rapid testing—no IPFS or manual database setup required. + +### Install `gnd` + +```bash +graph node install +gnd --version +``` + +### Run Locally + +From your subgraph directory: + +```bash +gnd --ethereum-rpc mainnet:http://localhost: --watch +``` + +Query your subgraph at: +`http://localhost:8000/subgraphs/name/subgraph-0/` + +> On Windows, include a PostgreSQL connection string: +> ```bash +> gnd --ethereum-rpc mainnet:http://localhost: > --postgres-url "postgresql://graph:yourpassword@localhost:5432/graph-node" +> ``` + +**Common Flags** +| Flag | Description | +|------|--------------| +| `--watch` | Auto-redeploy when files change | +| `--postgres-url` | Required on Windows | +| `--ethereum-rpc` | RPC endpoint (required) | + +--- + +## 5. Deploy to The Graph Network + +After verifying locally, deploy your subgraph to Studio: + +```bash +graph deploy --studio +``` + +This publishes your subgraph to The Graph Network through Studio. + +--- + +## 6. Monitor and Manage + +View logs, indexing progress, and query endpoints in your dashboard: + +🔗 **Dashboard:** +`https://thegraph.com/studio/` + +List all your deployments: + +```bash +graph subgraph list +``` + +--- + +## 7. Update Your Application + +Your subgraph’s GraphQL endpoint follows this format: + +``` +https://api.studio.thegraph.com/query/{user_id}/{subgraph_slug}/{version} +``` + +**Example:** + +``` +https://api.studio.thegraph.com/query/1234/my-subgraph/v1.0.0 +``` + +Replace your old endpoint with this one in your dApp or backend configuration. + +--- + +## 8. Verify Your Deployment + +Run a quick test query: + +```graphql +{ + transfers(first: 5) { + id + from + to + value + } +} +``` + +Ensure results match your expectations. + +--- + +## 9. Next Steps +- [Monitor your subgraphs in Studio →](https://thegraph.com/studio) +- [Join The Graph community →](https://discord.gg/graphprotocol) + +> Learn more about **Graph Node Dev Mode** → +> [https://thegraph.com/docs/en/subgraphs/developing/creating/graph-node-dev/](https://thegraph.com/docs/en/subgraphs/developing/creating/graph-node-dev/) From 2ab21c713c5cb64c8a882a05a3f8415e2bd08930 Mon Sep 17 00:00:00 2001 From: Jerry Okolo Date: Tue, 11 Nov 2025 20:15:22 +0100 Subject: [PATCH 02/15] Modify title --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 21d1da46f1b9..31dfd0cd46e5 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -1,8 +1,8 @@ --- -title: Migrate Your Subgraph to The Graph Network +title: Migrate Your Subgraph From Alchemy to The Graph Network --- -# Migrate Your Subgraph to The Graph Network +# Migrate Your Subgraph From Alchemy to The Graph Network This guide walks you through migrating or deploying an existing subgraph to **The Graph Network** — a decentralized and performant Graph Node infrastructure. You’ll learn how to build, test locally with **Graph Node Dev Mode (`gnd`)**, and deploy to **The Graph Studio**. From 75244b3e96bf64060d200f036c4825f3830dfcff Mon Sep 17 00:00:00 2001 From: Jerry Okolo Date: Tue, 11 Nov 2025 20:31:32 +0100 Subject: [PATCH 03/15] minor fixes --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 31dfd0cd46e5..96da4ba279ac 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -4,7 +4,7 @@ title: Migrate Your Subgraph From Alchemy to The Graph Network # Migrate Your Subgraph From Alchemy to The Graph Network -This guide walks you through migrating or deploying an existing subgraph to **The Graph Network** — a decentralized and performant Graph Node infrastructure. +This guide walks you through migrating or deploying an existing subgraph to **The Graph**. You’ll learn how to build, test locally with **Graph Node Dev Mode (`gnd`)**, and deploy to **The Graph Studio**. --- @@ -48,7 +48,7 @@ yarn codegen && yarn build --- -## 4. Test Locally with Graph Node Dev Mode +## 4. Test Locally with Subgraph Dev Mode `gnd` lets you run a local Graph Node instance for rapid testing—no IPFS or manual database setup required. From d16896630d302c2462af3551e7f7c5e27d2434e3 Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:53:23 +0100 Subject: [PATCH 04/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 96da4ba279ac..6a7e4aa399af 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -4,7 +4,8 @@ title: Migrate Your Subgraph From Alchemy to The Graph Network # Migrate Your Subgraph From Alchemy to The Graph Network -This guide walks you through migrating or deploying an existing subgraph to **The Graph**. +## Goal +Migrate or deploy an existing Subgraph to **The Graph**. You’ll learn how to build, test locally with **Graph Node Dev Mode (`gnd`)**, and deploy to **The Graph Studio**. --- From eeb74b84eb870d8551823de0a044ca405daaf6cd Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:53:55 +0100 Subject: [PATCH 05/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 6a7e4aa399af..89f24e75648b 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -22,7 +22,7 @@ You’ll need: --- -## 2. Install the CLI +## 2. Install and Authenticate with CLI Install and authenticate the CLI: From 9b3f65d5be269a3eadb4377cf425f1b55adde11e Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:54:06 +0100 Subject: [PATCH 06/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 89f24e75648b..4670ef6fac2d 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -6,7 +6,11 @@ title: Migrate Your Subgraph From Alchemy to The Graph Network ## Goal Migrate or deploy an existing Subgraph to **The Graph**. -You’ll learn how to build, test locally with **Graph Node Dev Mode (`gnd`)**, and deploy to **The Graph Studio**. +## Overview +This guide walks you through: +1. Preparing your environment and source code +2. Building and testing locally with **Graph Node Dev Mode (`gnd`)** +3. Deploying to [The Graph Studio](https://thegraph.com/studio/). --- From f4942c24e72c932ea2bec73fcbdcd715e5ba35f6 Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:54:17 +0100 Subject: [PATCH 07/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 4670ef6fac2d..e118339e1296 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -37,7 +37,7 @@ graph auth --studio --- -## 3. Prepare and Build +## 3. Prepare and Build Your Subgraph If you don’t already have a project, initialize one: From 15c32a2bdf043f3018df72a04c24d7ffe6f2d524 Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:54:30 +0100 Subject: [PATCH 08/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index e118339e1296..38357e8f734f 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -97,7 +97,7 @@ After verifying locally, deploy your subgraph to Studio: graph deploy --studio ``` -This publishes your subgraph to The Graph Network through Studio. +This command publishes your Subgraph to The Graph Network via Studio. --- From aa14a448645cd4f006b74b14584e51af06000dee Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:54:44 +0100 Subject: [PATCH 09/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 38357e8f734f..e29b80455e80 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -39,7 +39,7 @@ graph auth --studio ## 3. Prepare and Build Your Subgraph -If you don’t already have a project, initialize one: +If you don’t already have a project, initialize one from a contract: ```bash graph init --from-contract From 2fa5919b5c9ceddcb0c7c91d946fd15beca41595 Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:55:07 +0100 Subject: [PATCH 10/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index e29b80455e80..44026d6bbc86 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -101,7 +101,7 @@ This command publishes your Subgraph to The Graph Network via Studio. --- -## 6. Monitor and Manage +## 6. Monitor and Manage Your Deployment View logs, indexing progress, and query endpoints in your dashboard: From b68183f20a65714508691a4030f98d6d61409b0f Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:55:20 +0100 Subject: [PATCH 11/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 44026d6bbc86..e319915db937 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -108,7 +108,7 @@ View logs, indexing progress, and query endpoints in your dashboard: 🔗 **Dashboard:** `https://thegraph.com/studio/` -List all your deployments: +List all Subgraph deployments: ```bash graph subgraph list From 0986c2c91685f35fed5b91f9462fe5e6c8f184d0 Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:55:30 +0100 Subject: [PATCH 12/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index e319915db937..c68a499ddda3 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -103,7 +103,7 @@ This command publishes your Subgraph to The Graph Network via Studio. ## 6. Monitor and Manage Your Deployment -View logs, indexing progress, and query endpoints in your dashboard: +Access your Subgraph dashboard to view logs, indexing progress, and query endpoints: 🔗 **Dashboard:** `https://thegraph.com/studio/` From e999df761b3b2c8aff49f79d50f13c1bfde52ebe Mon Sep 17 00:00:00 2001 From: Jerry Okolo <73024324+itsjerryokolo@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:55:40 +0100 Subject: [PATCH 13/15] Update website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx Co-authored-by: Idalith <126833353+idalithb@users.noreply.github.com> --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index c68a499ddda3..10b83a378ada 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -105,7 +105,7 @@ This command publishes your Subgraph to The Graph Network via Studio. Access your Subgraph dashboard to view logs, indexing progress, and query endpoints: -🔗 **Dashboard:** +**Dashboard:** `https://thegraph.com/studio/` List all Subgraph deployments: From b3272a791e7aec91146e805daef3bef4e2eea1c8 Mon Sep 17 00:00:00 2001 From: Jerry Okolo Date: Wed, 12 Nov 2025 20:55:41 +0100 Subject: [PATCH 14/15] Fix formatting --- .../migration-guides/migrate-from-alchemy.mdx | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 10b83a378ada..75a4e39afee1 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -5,9 +5,13 @@ title: Migrate Your Subgraph From Alchemy to The Graph Network # Migrate Your Subgraph From Alchemy to The Graph Network ## Goal -Migrate or deploy an existing Subgraph to **The Graph**. + +Migrate or deploy an existing Subgraph to **The Graph**. + ## Overview -This guide walks you through: + +This guide walks you through: + 1. Preparing your environment and source code 2. Building and testing locally with **Graph Node Dev Mode (`gnd`)** 3. Deploying to [The Graph Studio](https://thegraph.com/studio/). @@ -17,6 +21,7 @@ This guide walks you through: ## 1. Prerequisites You’ll need: + - Your subgraph source code (`subgraph.yaml`, `schema.graphql`, `src/mapping.ts`) - [Node.js](https://nodejs.org), Yarn, and `graph-cli`: ```bash @@ -37,7 +42,7 @@ graph auth --studio --- -## 3. Prepare and Build Your Subgraph +## 3. Prepare and Build Your Subgraph If you don’t already have a project, initialize one from a contract: @@ -72,20 +77,16 @@ From your subgraph directory: gnd --ethereum-rpc mainnet:http://localhost: --watch ``` -Query your subgraph at: +Query your subgraph at:\ `http://localhost:8000/subgraphs/name/subgraph-0/` > On Windows, include a PostgreSQL connection string: +> > ```bash > gnd --ethereum-rpc mainnet:http://localhost: > --postgres-url "postgresql://graph:yourpassword@localhost:5432/graph-node" > ``` -**Common Flags** -| Flag | Description | -|------|--------------| -| `--watch` | Auto-redeploy when files change | -| `--postgres-url` | Required on Windows | -| `--ethereum-rpc` | RPC endpoint (required) | +**Common Flags** | Flag | Description | |------|--------------| | `--watch` | Auto-redeploy when files change | | `--postgres-url` | Required on Windows | | `--ethereum-rpc` | RPC endpoint (required) | --- @@ -105,7 +106,7 @@ This command publishes your Subgraph to The Graph Network via Studio. Access your Subgraph dashboard to view logs, indexing progress, and query endpoints: -**Dashboard:** +**Dashboard:**\ `https://thegraph.com/studio/` List all Subgraph deployments: @@ -154,8 +155,9 @@ Ensure results match your expectations. --- ## 9. Next Steps -- [Monitor your subgraphs in Studio →](https://thegraph.com/studio) -- [Join The Graph community →](https://discord.gg/graphprotocol) -> Learn more about **Graph Node Dev Mode** → +- [Monitor your subgraphs in Studio →](https://thegraph.com/studio) +- [Join The Graph community →](https://discord.gg/graphprotocol) + +> Learn more about **Graph Node Dev Mode** →\ > [https://thegraph.com/docs/en/subgraphs/developing/creating/graph-node-dev/](https://thegraph.com/docs/en/subgraphs/developing/creating/graph-node-dev/) From e59cf291764e9722b18c56efef7387a0aad5ee1d Mon Sep 17 00:00:00 2001 From: Jerry Okolo Date: Wed, 12 Nov 2025 21:05:07 +0100 Subject: [PATCH 15/15] Update heading level for migration guide title --- .../en/resources/migration-guides/migrate-from-alchemy.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx index 75a4e39afee1..e9d0d4b34a57 100644 --- a/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx +++ b/website/src/pages/en/resources/migration-guides/migrate-from-alchemy.mdx @@ -2,7 +2,7 @@ title: Migrate Your Subgraph From Alchemy to The Graph Network --- -# Migrate Your Subgraph From Alchemy to The Graph Network +## Migrate Your Subgraph From Alchemy to The Graph Network ## Goal