【问题标题】:how can I install apollo-angular on angular 14?如何在 angular 14 上安装 apollo-angular?
【发布时间】:2022-11-10 22:40:35
【问题描述】:

在 angular 14 上测试 apollo-angular 时出现此错误

错误:node_modules/apollo-angular/types.d.ts:11:54 - 错误 TS2312:接口只能扩展对象类型或对象类型与静态已知成员的交集。

11 导出接口 MutationResult<TData = any> 扩展 FetchResult { ~~~~~~~~~~~~~~~~~~ 如何重现错误:

  1. 新建 angular 14 项目
  2. 在项目中添加 apollo-angular,如文档 https://apollo-angular.com/docs/get-started 中的此处

    你能帮助我吗?我现在真的需要解决这个问题

    enter image description here

【问题讨论】:

    标签: angular apollo apollo-angular


    【解决方案1】:

    有一个current issue

    使用 @apollo/client 的 3.6.9 版本作为解决方法。

    【讨论】:

      【解决方案2】:

      结果你必须升级到apollo-angular4.1.0 版本。升级后我能够解决这个问题。

      看看这个release

      【讨论】:

        猜你喜欢
        • 2022-08-06
        • 1970-01-01
        • 2022-08-23
        • 1970-01-01
        • 2019-08-21
        • 2018-09-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多