[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10532":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},10532,"graph-node","graphprotocol\u002Fgraph-node","graphprotocol","Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL","https:\u002F\u002Fthegraph.com",null,"Rust",3136,1059,88,278,0,10,31.08,"Apache License 2.0",false,"master",true,[24,25,26,27,28,29,30,31],"blockchain","developer-tools","ethereum","graphql","graphql-api","graphql-server","ipfs","protocol","2026-06-12 02:02:23","# Graph Node\n\n[![Build Status](https:\u002F\u002Fgithub.com\u002Fgraphprotocol\u002Fgraph-node\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgraphprotocol\u002Fgraph-node\u002Factions\u002Fworkflows\u002Fci.yml?query=branch%3Amaster)\n[![Docs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-graph--node-green.svg)](docs\u002F)\n[![Subgraphs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-subgraphs-green.svg)](https:\u002F\u002Fthegraph.com\u002Fdocs\u002Fen\u002Fsubgraphs\u002Fquick-start\u002F)\n\n## Overview\n\n[The Graph](https:\u002F\u002Fthegraph.com\u002F) is a 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.\n\nBefore using `graph-node,` it is highly recommended that you read the [official Graph documentation](https:\u002F\u002Fthegraph.com\u002Fdocs\u002Fen\u002Fsubgraphs\u002Fquick-start\u002F) to understand Subgraphs, which are the central mechanism for extracting and organizing blockchain data.\n\nThis guide is for:\n\n1. Subgraph developers who want to run `graph-node` locally to test their Subgraphs during development\n2. Contributors who want to add features or fix bugs to `graph-node` itself\n\n## Running `graph-node` from Docker images\n\nFor subgraph developers, it is highly recommended to use prebuilt Docker\nimages to set up a local `graph-node` environment. Please read [these\ninstructions](.\u002Fdocker\u002FREADME.md) to learn how to do that.\n\n## Running `graph-node` from source\n\nThis is usually only needed for developers who want to contribute to `graph-node`.\n\n### Prerequisites\n\nTo build and run this project, you need to have the following installed on your system:\n\n- Rust (latest stable): Follow [How to install\n  Rust](https:\u002F\u002Frust-lang.org\u002Ftools\u002Finstall\u002F). Run `rustup install\nstable` in _this directory_ to make sure all required components are\n  installed. The `graph-node` code assumes that the latest available\n  `stable` compiler is used.\n- PostgreSQL: [PostgreSQL Downloads](https:\u002F\u002Fwww.postgresql.org\u002Fdownload\u002F) lists\n  downloads for almost all operating systems.\n  - For OSX: We highly recommend [Postgres.app](https:\u002F\u002Fpostgresapp.com\u002F).\n  - For Linux: Use the Postgres version that comes with the distribution.\n- IPFS: [Installing IPFS](https:\u002F\u002Fdocs.ipfs.io\u002Finstall\u002F)\n- Protobuf Compiler: [Installing Protobuf](https:\u002F\u002Fgrpc.io\u002Fdocs\u002Fprotoc-installation\u002F)\n\nFor Ethereum network data, you can either run your own Ethereum node or use an Ethereum node provider of your choice.\n\n### Create a database\n\nOnce Postgres is running, you need to issue the following commands to create a database\nand configure it for use with `graph-node`.\n\nThe name of the `SUPERUSER` depends on your installation, but is usually `postgres` or your username.\n\n```bash\npsql -U \u003CSUPERUSER> \u003C\u003CEOF\ncreate user graph with password '\u003Cpassword>';\ncreate database \"graph-node\" with owner=graph template=template0 encoding='UTF8' locale='C';\ncreate extension pg_trgm;\ncreate extension btree_gist;\ncreate extension postgres_fdw;\ngrant usage on foreign data wrapper postgres_fdw to graph;\nEOF\n```\n\nFor convenience, set the connection string to the database in an environment\nvariable, and save it, e.g., in `~\u002F.bashrc`:\n\n```bash\nexport POSTGRES_URL=postgresql:\u002F\u002Fgraph:\u003Cpassword>@localhost:5432\u002Fgraph-node\n```\n\nUse the `POSTGRES_URL` from above to have `graph-node` connect to the\ndatabase. If you ever need to manually inspect the contents of your\ndatabase, you can do that by running `psql $POSTGRES_URL`. Running this\ncommand is also a convenient way to check that the database is up and\nrunning and that the connection string is correct.\n\n### Build and Run `graph-node`\n\nClone this repository and run this command at the root of the repository:\n\n```bash\nexport GRAPH_LOG=debug\ncargo run -p graph-node --release -- \\\n  --postgres-url $POSTGRES_URL \\\n  --ethereum-rpc NETWORK_NAME:[CAPABILITIES]:URL \\\n  --ipfs 127.0.0.1:5001\n```\n\nThe argument for `--ethereum-rpc` contains a network name (e.g. `mainnet`) and\na list of provider capabilities (e.g. `archive,traces`). The URL is the address\nof the Ethereum node you want to connect to, usually a `https` URL, so that the\nentire argument might be `mainnet:archive,traces:https:\u002F\u002Fprovider.io\u002Fsome\u002Fpath`.\n\nWhen `graph-node` starts, it prints the various ports that it is listening on.\nThe most important of these is the GraphQL HTTP server, which by default\nis at `http:\u002F\u002Flocalhost:8000`. You can use routes like `\u002Fsubgraphs\u002Fname\u002F\u003Csubgraph-name>`\nand `\u002Fsubgraphs\u002Fid\u002F\u003CIPFS hash>` to query subgraphs once you have deployed them.\n\n### Deploying a Subgraph\n\nFollow the [Subgraph deployment\nguide](https:\u002F\u002Fthegraph.com\u002Fdocs\u002Fen\u002Fsubgraphs\u002Fdeveloping\u002Fintroduction\u002F).\nAfter setting up `graph-cli` as described, you can deploy a Subgraph to your\nlocal Graph Node instance.\n\n### Advanced Configuration\n\nThe command line arguments generally are all that is needed to run a\n`graph-node` instance. For advanced uses, various aspects of `graph-node`\ncan further be configured through [environment\nvariables](https:\u002F\u002Fgithub.com\u002Fgraphprotocol\u002Fgraph-node\u002Fblob\u002Fmaster\u002Fdocs\u002Fenvironment-variables.md).\n\nVery large `graph-node` instances can also be configured using a\n[configuration file](.\u002Fdocs\u002Fconfig.md) That is usually only necessary when\nthe `graph-node` needs to connect to multiple chains or if the work of\nindexing and querying needs to be split across [multiple databases](.\u002Fdocs\u002Fconfig.md).\n\n#### Log Storage\n\n`graph-node` supports storing and querying subgraph logs through multiple backends:\n\n- **File**: Local JSON Lines files (recommended for local development)\n- **Elasticsearch**: Enterprise-grade search and analytics (for production)\n- **Loki**: Grafana's log aggregation system (for production)\n- **Disabled**: No log storage (default)\n\n**Quick example (file-based logs for local development):**\n```bash\nmkdir -p .\u002Fgraph-logs\n\ncargo run -p graph-node --release -- \\\n  --postgres-url $POSTGRES_URL \\\n  --ethereum-rpc mainnet:archive:https:\u002F\u002F... \\\n  --ipfs 127.0.0.1:5001 \\\n  --log-store-backend file \\\n  --log-store-file-dir .\u002Fgraph-logs\n```\n\nLogs are queried via GraphQL at `http:\u002F\u002Flocalhost:8000\u002Fgraphql`:\n```graphql\nquery {\n  _logs(subgraphId: \"QmYourSubgraphHash\", level: ERROR, first: 10) {\n    timestamp\n    level\n    text\n  }\n}\n```\n\n**For complete documentation**, see the **[Log Store Guide](.\u002Fdocs\u002Flog-store.md)**, which covers:\n- How to configure each backend (Elasticsearch, Loki, File)\n- Complete GraphQL query examples\n- Choosing the right backend for your use case\n- Performance considerations and best practices\n\n## Contributing\n\nPlease check [CONTRIBUTING.md](CONTRIBUTING.md) for development flow and conventions we use.\nHere's [a list of good first issues](https:\u002F\u002Fgithub.com\u002Fgraphprotocol\u002Fgraph-node\u002Flabels\u002Fgood%20first%20issue).\n\n## License\n\nCopyright &copy; 2018-2019 Graph Protocol, Inc. and contributors.\n\nThe Graph is dual-licensed under the [MIT license](LICENSE-MIT) and the [Apache License, Version 2.0](LICENSE-APACHE).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. See the License for the specific language governing permissions and limitations under the License.\n","Graph Node 是一个用于从以太坊等区块链中提取数据并通过GraphQL提供服务的项目。它使用Rust语言编写，支持通过Subgraphs机制高效地组织和查询区块链数据，具备强大的索引能力与灵活的数据访问接口。此外，Graph Node还集成了IPFS协议来处理文件存储需求，并利用PostgreSQL数据库进行数据管理。此项目非常适合需要构建去中心化应用（DApps）或希望为Web3项目开发强大后端服务的开发者们。无论是测试阶段还是生产环境，Graph Node都能提供稳定可靠的支持。",2,"2026-06-11 03:29:01","top_topic"]