Skip to content

Commit 93bdc7c

Browse files
committed
docs: improve README with clearer deployment instructions and formatting
1 parent 67ffe56 commit 93bdc7c

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

packages/subgraph/README.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ npm run deploy-local
2222

2323
### Test Subgrah API
2424

25-
Deployed to : http://localhost:8000/subgraphs/name/DataProtector/graphql
25+
Deployed to : <http://localhost:8000/subgraphs/name/DataProtector/graphql>
2626

2727
Request Example on GraphiQL :
2828

2929
Query for GraphiQL API
30+
3031
```graphql
3132
query MyQuery($requiredSchema: [String!]!, $start: Int!, $range: Int!) {
3233
protectedDatas(
@@ -68,10 +69,36 @@ Query Variables :
6869

6970
## Hosted
7071

71-
Trigger deployment via promote action on CI.
72+
You can trigger a deployment using the promote action on the CI.
73+
74+
### Self Hosted Subgraph
75+
76+
To deploy a new version of a subgraph on the iExec self-hosted service, follow these steps:
77+
78+
1. Index the New Subgraph
79+
80+
First, index the new version of the subgraph using the temporary subgraph deployment.
81+
Trigger its deployment with the target:
82+
83+
```sh
84+
subgraph-deploy-tmp
85+
```
86+
87+
2. Wait for Indexing Completion
88+
89+
Once the temporary subgraph has finished indexing, you can proceed to the production deployment.
90+
91+
3. Deploy to Production (No Downtime)
92+
93+
Trigger the production deployment with :
94+
95+
```sh
96+
subgraph-deploy-prod
97+
```
7298

73-
### Hosted dev subgraph
99+
This ensures a seamless transition with no downtime.
74100

75-
Promote with target `dev-subgraph` to deploy on https://thegraph.iex.ec/subgraphs/name/bellecour/dev-dataprotector
101+
4. Verify the Deployment
76102

77-
### Subgraph API on Production
103+
Visit the following URL to check the new version of the subgraph:
104+
<https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2/graphql>

0 commit comments

Comments
 (0)