Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 1.3 KB

README_zh.md

File metadata and controls

47 lines (27 loc) · 1.3 KB

Subgraph-template

English | 简体中文

TheGraph 公开了一个 GraphQL 端点,可查询xxx区块链和xxx生态系统中的事件和实体。

当前有多个子图,可以按照当前的架构向该存储库添加其他子图。

子图列表

  1. Demo: Tracks data for Demo.

依赖项目

  • Graph CLI
    • Required to generate and build local GraphQL dependencies.
yarn global add @graphprotocol/graph-cli

子图部署

对于任何一个子图:将[子图]替换成具体的名称

  1. 运行 cd subgraphs/[subgraph] 命令 进入子图目录。

  2. 运行 yarn codegen 命令,为GraphQL准备TypeScript源代码(generated/*)。

  3. 运行 yarn build 命令 编译子图,并在部署前检查编译错误。

  4. 运行 graph auth --product hosted-service '<ACCESS_TOKEN>'

  5. 通过 yarn deploy 部署。