Skip to content

Commit 33733da

Browse files
committed
Update readme to add deployment steps
1 parent d22b7d8 commit 33733da

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

packages/subgraph/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ npm run deploy-local
2626

2727
The subgraph will be available at: http://localhost:8000/subgraphs/name/DataProtector/graphql
2828

29+
### Thegraph network
30+
31+
To deploy this subgraph on Thegraph network:
32+
33+
1. Update `networks.json` file to use the correct addresses for the correct network.
34+
35+
2. Authenticate: `npx graph auth <token>`
36+
37+
3. Deploy: `npx graph deploy <slug> --network <name>`
38+
39+
2940
### Hosted Production Environments
3041

3142
We use CI/CD pipelines to deploy our subgraphs to hosted environments.
@@ -53,7 +64,7 @@ For zero-downtime updates to the production subgraph:
5364

5465
2. **Wait for Indexing Completion**
5566
- Monitor the temporary deployment until it's fully synced
56-
67+
5768
3. **Deploy to Production (Zero Downtime)**
5869
- Once temporary deployment is ready, trigger: `subgraph-deploy-prod`
5970
- This swaps the deployments with no service interruption
@@ -108,7 +119,7 @@ query MyQuery($requiredSchema: [String!]!, $start: Int!, $range: Int!) {
108119

109120
1. Update schema.graphql and subgraph.yaml as needed
110121
2. Run codegen to generate TypeScript types: `npm run codegen`
111-
3. Implement mapping handlers in src/ files
122+
3. Implement mapping handlers in src/ files
112123
4. Build the subgraph: `npm run build`
113124
5. Test locally before deploying to production environments
114125

0 commit comments

Comments
 (0)