diff --git a/website/pages/en/developing/creating-a-subgraph.mdx b/website/pages/en/developing/creating-a-subgraph.mdx index 3bf9fe432fa0..9b23100068a9 100644 --- a/website/pages/en/developing/creating-a-subgraph.mdx +++ b/website/pages/en/developing/creating-a-subgraph.mdx @@ -66,14 +66,14 @@ graph init \ The following command initializes a new project from an example subgraph: ```sh ---studio --from-example=example-subgraph +graph init--studio --from-example=example-subgraph ``` - The [example subgraph](https://github.com/graphprotocol/example-subgraph) is based on the Gravity contract by Dani Grant, which manages user avatars and emits `NewGravatar` or `UpdateGravatar` events whenever avatars are created or updated. - The subgraph handles these events by writing `Gravatar` entities to the Graph Node store and ensuring these are updated according to the events. -### Add new `dataSources` to an existing subgraph +## Add new `dataSources` to an existing subgraph Since `v0.31.0`, the Graph CLI supports adding new `dataSources` to an existing subgraph through the `graph add` command: @@ -88,9 +88,9 @@ Options: --network-file Networks config file path (default: "./networks.json") ``` -#### Specifics +### Specifics -The `add` command will fetch the ABI from Etherscan (unless an ABI path is specified with the `--abi` option) and creates a new `dataSource`, similar to how the `graph init` command creates a `dataSource` `--from-contract`, updating the schema and mappings accordingly. This allows you to index implementation contracts from their proxy contracts. +The `graph add` command will fetch the ABI from Etherscan (unless an ABI path is specified with the `--abi` option) and creates a new `dataSource`, similar to how the `graph init` command creates a `dataSource` `--from-contract`, updating the schema and mappings accordingly. This allows you to index implementation contracts from their proxy contracts. - The `--merge-entities` option identifies how the developer would like to handle `entity` and `event` name conflicts: