You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](docs/getting-started.md)
5
5
6
-
[The Graph](https://thegraph.com/) is a protocol that organizes and serves web3 data.
6
+
## Overview
7
7
8
-
Graph Node extracts and transforms blockchain data and makes the transformed
9
-
data available to decentralized applications (dApps) via GraphQL queries.
10
-
You can find more details on how to write these transformations, called
11
-
_subgraphs_, in the official [Graph
12
-
documentation](https://thegraph.com/docs/en/subgraphs/quick-start/). If you
13
-
are not familiar already with subgraphs, we highly recommend at least
14
-
reading through that documentation first.
8
+
[The Graph](https://thegraph.com/) is decentralized protocol that organizes and distributes blockchain data across the leading Web3 networks. A key component of The Graph's tech stack is Graph Node.
15
9
16
-
The rest of this page is geared towards two audiences:
10
+
Before using `graph-node,` it is highly recommended that you read the [official Graph documentation](https://thegraph.com/docs/en/subgraphs/quick-start/) to understand Subgraphs, which are the central mechanism for extracting and organizing blockchain data.
17
11
18
-
1. Subgraph developers who want to run `graph-node` locally so they can test
19
-
their subgraphs during development
20
-
2. Developers who want to contribute bug fixes and features to `graph-node`
21
-
itself
12
+
This guide is for:
13
+
14
+
1. Subgraph developers who want to run `graph-node` locally to test their Subgraphs during development
15
+
2. Contributors who want to add features or fix bugs to `graph-node` itself
22
16
23
17
## Running `graph-node` from Docker images
24
18
@@ -32,26 +26,28 @@ This is usually only needed for developers who want to contribute to `graph-node
32
26
33
27
### Prerequisites
34
28
35
-
To build and run this project you need to have the following installed on your system:
29
+
To build and run this project, you need to have the following installed on your system:
36
30
37
-
- Rust (latest stable) – [How to install Rust](https://www.rust-lang.org/en-US/install.html)
38
-
has general instructions. Run `rustup install stable` in this directory to make
39
-
sure all required components are installed. The `graph-node` code assumes that the
With this setup, the URL that you will use to have `graph-node` connect to the
71
-
database will be `postgresql://graph:<password>@localhost:5432/graph-node`. If
72
-
you ever need to manually inspect the contents of your database, you can do
73
-
that by running `psql $POSTGRES_URL`.
70
+
Use the `POSTGRES_URL` from above to have `graph-node` connect to the
71
+
database. If you ever need to manually inspect the contents of your
72
+
database, you can do that by running `psql $POSTGRES_URL`. Running this
73
+
command is also a convenient way to check that the database is up and
74
+
running and that the connection string is correct.
74
75
75
-
### Build `graph-node`
76
+
### Build and Run `graph-node`
76
77
77
-
To build `graph-node`, clone this repository and run this command at the
78
-
root of the repository:
78
+
Clone this repository and run this command at the root of the repository:
79
79
80
80
```bash
81
81
export GRAPH_LOG=debug
@@ -91,13 +91,16 @@ of the Ethereum node you want to connect to, usually a `https` URL, so that the
91
91
entire argument might be `mainnet:archive,traces:https://provider.io/some/path`.
92
92
93
93
When `graph-node` starts, it prints the various ports that it is listening on.
94
-
The most important of these is the GraphQL HTTP server, which is by default
94
+
The most important of these is the GraphQL HTTP server, which by default
95
95
is at `http://localhost:8000`. You can use routes like `/subgraphs/name/<subgraph-name>`
96
96
and `/subgraphs/id/<IPFS hash>` to query subgraphs once you have deployed them.
97
97
98
98
### Deploying a Subgraph
99
99
100
-
Instructions for how to deploy subgraphs can be found [here](https://thegraph.com/docs/en/subgraphs/developing/introduction/) After setting up `graph-cli` as described there, you can deploy a subgraph to your local Graph Node instance.
0 commit comments