Skip to content

Commit a0fcbde

Browse files
committed
docs(cli): document gnd delegation switchover
Add a changeset describing the major-version bump, document the new gnd dispatch in the CLI README (including the GRAPH_CLI_IGNORE_GND escape hatch and the removal of `graph node install`), add `graph dev` to the command list, and mark `graph local` as deprecated in favor of `graph dev`.
1 parent 7fa40fc commit a0fcbde

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

.changeset/delegate-to-gnd.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@graphprotocol/graph-cli': major
3+
---
4+
5+
Delegate commands to `gnd` by default
6+
7+
`graph <cmd>` now execs the `@graphprotocol/gnd` binary (shipped as a
8+
dependency) instead of running the bundled TypeScript implementation.
9+
Set `GRAPH_CLI_IGNORE_GND=1` to force every command back through the
10+
oclif/TS code path.
11+
12+
Breaking changes:
13+
14+
- The `graph node install` command has been removed. Install `gnd` via
15+
the `@graphprotocol/gnd` npm package instead — it is now a direct
16+
dependency of `@graphprotocol/graph-cli` and no separate download
17+
step is required.
18+
- `graph local` is the only command that still always runs the
19+
TypeScript implementation; gnd has no equivalent.
20+
- `graph dev` is an oclif shim that always delegates to `gnd dev`.

packages/cli/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,29 @@ As of today, the command line interface supports the following commands:
1717
- `graph auth` — Stores a [Graph Node](https://github.com/graphprotocol/graph-node) access token in
1818
the system's keychain.
1919
- `graph local` — Runs tests against a [Graph Node](https://github.com/graphprotocol/graph-node)
20-
test environment (using Ganache by default).
20+
test environment (using Ganache by default) (deprecated, use `graph dev` instead).
21+
- `graph dev` — Runs a local
22+
[Graph Node](https://github.com/graphprotocol/graph-node) in dev mode (delegates to
23+
[`gnd dev`](https://www.npmjs.com/package/@graphprotocol/gnd)).
2124
- `graph test` — Downloads and runs the [Matchstick](https://github.com/LimeChain/matchstick) rust
2225
binary in order to test a subgraph.
2326
- `graph add` - Adds a new datasource to the yaml file and writes the necessary changes to other
2427
files - schema.graphql, abi and mapping.
2528
- `graph publish` - Publishes the subgraph to the Graph Network.
2629

30+
### Command dispatch via `gnd`
31+
32+
By default, `graph <cmd>` execs the
33+
[`@graphprotocol/gnd`](https://www.npmjs.com/package/@graphprotocol/gnd) binary, which is shipped
34+
as a dependency of the CLI. The TypeScript implementation in this package is used as a fallback for
35+
commands that `gnd` does not provide.
36+
37+
- `graph local` always runs the TypeScript implementation — `gnd` has no equivalent.
38+
- Set `GRAPH_CLI_IGNORE_GND=1` to route every command through the TypeScript implementation.
39+
40+
The previous `graph node install` command, which downloaded a `gnd` binary from GitHub releases,
41+
has been removed. Installing `@graphprotocol/graph-cli` is now sufficient to get `gnd`.
42+
2743
## How It Works
2844

2945
The Graph CLI takes a subgraph manifest (defaults to `subgraph.yaml`) with references to:

0 commit comments

Comments
 (0)