Skip to content

Commit 774f055

Browse files
authored
docs: Document apiVersion update and release process
1 parent 1a8c3ef commit 774f055

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/adding-a-new-api-version.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Adding a new `apiVersion`
2+
3+
This document explains how to coordinate an `apiVersion` upgrade
4+
across all impacted projects:
5+
6+
1. [`graph-node`](https:github.com/graphprotocol/graph-node)
7+
2. [`graph-ts`](https:github.com/graphprotocol/graph-ts)
8+
3. [`graph-cli`](https:github.com/graphprotocol/graph-cli)
9+
4. `graph-docs`
10+
11+
## Steps
12+
13+
Those steps should be taken after all relevant `graph-node` changes
14+
have been rolled out to production (hosted-service):
15+
16+
1. Update the default value of the `GRAPH_MAX_API_VERSION` environment
17+
variable, currently located at this file: `graph/src/data/subgraph/mod.rs`.
18+
If you're setting it up somewhere manually, you should change there
19+
as well, or just remove it.
20+
21+
2. Update `graph-node` minor version and create a new release.
22+
23+
3. Update `graph-ts` version and create a new release.
24+
25+
4. For `graph-cli`:
26+
27+
1. Write migrations for the new `apiVersion`.
28+
2. Update the version restriction on the `build` and `deploy`
29+
commands to match the new `graph-ts` and `apiVersion` versions.
30+
3. Update the `graph-cli` version in `package.json`.
31+
4. Update `graph-ts` and `graph-cli` version numbers on scaffolded code and examples.
32+
5. Recompile all the examples by running `=$ npm install` inside
33+
each example directory.
34+
6. Update `graph-cli`\'s version and create a new release.
35+
7. Release in NPM
36+
37+
5. Update `graph-docs` with the new `apiVersion` content.

0 commit comments

Comments
 (0)