Skip to content

Commit 2eaca13

Browse files
committed
Merge branch 'release-please--branches--main--components--subgraph' of https://github.com/iExecBlockchainComputing/dataprotector-sdk into release-please--branches--main--components--subgraph
2 parents 1dc4ed4 + c059499 commit 2eaca13

File tree

3 files changed

+18
-47
lines changed

3 files changed

+18
-47
lines changed

.drone-consider

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ packages/sdk/.drone.yml
33
packages/dataprotector-deserializer/.drone.yml
44
packages/sharing-smart-contract/.drone.yml
55
packages/smart-contract/.drone.yml
6-
packages/subgraph/.drone.yml
76
packages/protected-data-delivery-dapp/.drone.yml
87
packages/protected-data-delivery-dapp/deployment/.drone.yml

packages/subgraph/.drone.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/subgraph/README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,30 @@ npm run create-local
2424
npm run deploy-local
2525
```
2626

27-
The subgraph will be available at: http://localhost:8000/subgraphs/name/DataProtector/graphql
27+
The subgraph will be available at: <http://localhost:8000/subgraphs/name/DataProtector/graphql>
2828

2929
### Thegraph network
3030

3131
To deploy this subgraph on Thegraph network:
3232

33-
1. Update `networks.json` file to use the correct addresses for the correct network.
33+
1. Set up your environment variables in `.env` file:
3434

35-
2. Authenticate: `npx graph auth <token>`
35+
```bash
36+
SUBGRAPH_SLUG=your-subgraph-slug
37+
SUBGRAPH_DEPLOY_KEY=your-deploy-key
38+
SUBGRAPH_NETWORK_NAME=your-network-name
39+
VERSION_LABEL=your-version-label
40+
```
3641

37-
3. Deploy: `npx graph deploy <slug> --network <name>`
42+
2. Deploy using the npm script:
3843

39-
### Hosted Production Environments
40-
41-
We use CI/CD pipelines to deploy our subgraphs to hosted environments.
44+
```bash
45+
npm run deploy-studio
46+
```
4247

4348
### Self-Hosted Subgraph Deployment Process
4449

50+
We use CI/CD pipelines to deploy our subgraphs to hosted environments.
4551
For zero-downtime updates to the production subgraph:
4652

4753
1. **Index the New Version (Temporary Deployment)**
@@ -59,7 +65,7 @@ For zero-downtime updates to the production subgraph:
5965
- This swaps the deployments with no service interruption
6066

6167
4. **Verify the Deployment**
62-
- Access the production subgraph at: https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2/graphql
68+
- Access the production subgraph at: <https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2/graphql>
6369

6470
## Query Examples
6571

@@ -108,14 +114,14 @@ query MyQuery($requiredSchema: [String!]!, $start: Int!, $range: Int!) {
108114

109115
1. Update schema.graphql and subgraph.yaml as needed
110116
2. Run codegen to generate TypeScript types: `npm run codegen`
111-
3. Implement mapping handlers in src/ files
117+
3. Implement mapping handlers in `src/` files
112118
4. Build the subgraph: `npm run build`
113119
5. Test locally before deploying to production environments
114120

115121
## CI/CD Integration
116122

117123
Our repository uses automated workflows to build, test, and deploy the subgraph:
118124

119-
- ABI validation checks ensure contract ABIs are up-to-date
120-
- Docker images are built and pushed with appropriate tags based on the source branch
121-
- Deployment follows a staged approach to ensure zero downtime
125+
- **ABI Validation**: Ensures contract ABIs are up-to-date across all packages
126+
- **Testing**: Unit and integration tests validate subgraph functionality (TODO)
127+
- **Zero-Downtime Deployment**: Staged deployment process ensures continuous service availability

0 commit comments

Comments
 (0)