简体   繁体   English

无法建立子图:缩进错误

[英]Can not build a subgraph: indentation error

I am trying to create a subgraph with the graph-cli and publish it to the Graph network.我正在尝试使用graph-cli创建一个子图并将其发布到 Graph 网络。 Here is my subgraph yaml file:这是我的子图 yaml 文件:

specVersion: 0.0.4
schema:
  file: ./schema.graphql
dataSources:
  – kind: ethereum
    name: Contract
    network: mainnet
    source:
      address: “0xc944e90c64b2c07662a292be6244bdf05cda44a7”
      abi: Contract
      startBlock: 11446769
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.5
      language: wasm/assemblyscript
      entities:
        – Transfer
      abis:
        – name: Contract
          file: ./abis/Contract.json
      eventHandlers:
        – event: Transfer(indexed address,indexed address,uint256)
          handler: handleTransfer
      file: ./src/contract.ts

But when I am trying to build the subgraph with the npm run codegen command I am getting the following error:但是,当我尝试使用npm run codegen命令构建子图时,出现以下错误:

在此处输入图像描述

But I am not sure how there is an indentation problem.但我不确定如何存在缩进问题。 How can this be resolved?如何解决?

You are using the wrong dash.您使用了错误的破折号。 You should do - rather than .你应该做-而不是

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Address[] 无法分配给 Bytes[] - 子图构建 - Address[] can not assign to Bytes[] - Subgraph Build 我可以强制 Apollo Supergraph 指向特定的子图吗? - Can I force an Apollo Supergraph to point to specific Subgraph? 尝试使用 .NET Core GraphQL 联合子图时,Apollo 联合网关返回错误 - Apollo Federated Gateway returns an error when trying to use a .NET Core GraphQL federated subgraph 将 uniswap v3 子图部署到本地图节点错误:索引 handleIncreaseLiquidity Token#get:decimals 并显示消息:“Value is not a BigInt” - Deploy uniswap v3 subgraph to local graph-node error: indexing handleIncreaseLiquidity Token#get:decimals with message: "Value is not a BigInt" 图表:没有为子图查询中的 ID 参数提供值 - The Graph: No value provided for ID argument in subgraph query Apollo Federation - 网关子图健康检查 - Apollo Federation - Subgraph healfth check in gateway 以人类可读的格式显示子图时间戳结果 - Showing subgraph timestamp results in human-readable format 基于以太坊地址选择的托管服务问题子图 - Subgraph on hosted service issue with selecting based on an ethereum address Apollo iOS:运行脚本,构建失败错误 - Apollo iOS: Run script, Build fail Error Apollo codegen 生成文件缩进 - Apollo codegen generate files indentation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM