【问题标题】:'SchemaMetadata' is not a member type of type 'Self.Schema'\'SchemaMetadata\' 不是类型 \'Self.Schema\' 的成员类型
【发布时间】:2022-12-11 22:46:48
【问题描述】:

我在 xcode 项目 (xcode --version 14 && swift --version 5.7) 中工作并构建一个 apollo 客户端项目,在其中生成 query.graphql 文件后,我在执行以下命令后生成的架构包中收到此错误:-

to build apollo-io-cli
git clone https://github.com/apollographql/apollo-ios.git
cd apollo-ios
make build-cli
find . -name apollo-ios-cli
copy the found apollo-io-cli to your directory where  you have schema.json file 
run from that directory
./apollo-ios-cli generate
this will generate the swift files for graphql

这里我使用的是 apollo-ios 版本 1.0.2

here is the screen shot of error

【问题讨论】:

    标签: ios swift xcode graphql apollo-ios


    【解决方案1】:

    可能,您将模式命名为“模式”,这会带来冲突。尝试将其重命名为其他名称

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-17
      • 1970-01-01
      • 1970-01-01
      • 2019-06-28
      相关资源
      最近更新 更多