ios - 'SchemaMetadata' 不是 'Self.Schema' 类型的成员类型

标签 ios swift xcode graphql apollo-ios

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

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 - 'SchemaMetadata' 不是 'Self.Schema' 类型的成员类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74161471/

相关文章:

ios - 无法根据 objective-c 中标签的文本大小设置单元格大小

ios - locationManager didUpdateLocations 在设备上触发两次,在模拟器上只触发一次

iphone - 当应用程序已经运行时将本地通知声音静音

ios - Xcode在制作表单时将默认按钮设置为输入

ios - 创建 NSAttributedString 时索引 1 超出范围 [0 .. 0]

iOS 自动布局 : get width of views inside a view in ViewController

html - blogdown 不自动缩放图像 - 在 iOS 上查看时它们会被中途截断

swift - 如果按钮宽度大于按钮图像的宽度(xcode),则将按钮图像保持在左侧位置

swift - 带有 UITapGestureRecognizer 的 UIView 中的 UITableViewCell didSelectRowAt

ios - 上下文类型 'AnyObject' 不能与字典文字一起使用